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++ 1.d) Find the output of the following program:
3 Ans: Output:
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 Ans: Outputs:
Ans) Since random(2) gives either 0 or 1, ToGo value will be either 1 or 2.(random(n) gives you any number between 0 to n-1) Area[1] is “SOUTH”. Area[2] is “EAST”.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 “SOUTH” or “EAST”. So the possible output will be
CBSE Computer Science Solved Revision Tour By Mr. Ravi Kiran ( [email protected] ) |
|