CBSE Computer Science - Revision Tour(Solved) CBSE Guess > eBooks > Class XII > CBSE Computer Science C++ Solved Revision Tour By Mr. Ravi Kiran COMPUTER SCIENCE C++ e) Find the output of the following program:
2 Ans: Output:
f) In the following program, find the correct possible output(s) from the options:
2 Outputs:
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 iterationswill takes place.So the possible output consists 3 strings separated by :, each of them may be either “CHN” or “KOL”. So the possible output will be
2008 Outside Delhi: 1.b) Name the header files that shall be needed for the following code:
Ans: iostream.h, iomanip.h 1.c) Rewrite the following program after removing the syntax error(s) if any. Underline each correction.
Ans:
CBSE Computer Science Solved Revision Tour By Mr. Ravi Kiran ( mrkdata@yahoo.com ) |