CBSE Guess > Papers > Important Questions > Class XII > 2010 > Computer Science > Computer Science By Ravi Kiran CBSE CLASS XII Ans: Output: f. In the following program, find the correct
possible output(s) from the options: 2 Outputs: (i) DEL : CHN : KOL: Ans: Since random(2) gives either 0 or 1, Fly
value will be either 1 or 2.
(random(n) gives you any number between 0
to n-1)
City[1] is “CHN”. City[2] is “KOL”.
Since I value from 0 to 2 (ie<3), 3 iterations
will takes place.
So the possible output consists 3 strings
separated by :, each of them may be either So the possible output will be 2008 Outside Delhi Q.1.b. Name the header files that shall be
needed for the following code: 1 Ans: iostream.h, iomanip.h Q. 1.c. Rewrite the following program after
removing the syntax error(s) if any. Underline
each correction. 2 Paper By Mr. Ravi Kiran |