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.e) Find the output of the following program :
2 Ans: teRmttoe 1.f) Study the following program and select the possible output from it:
2 Ans: (iv) 51#50# Solution: MAX value is 3
That’s why random(MAX) can produce 0 or 1 or 2.
(random(N) will produce no. between 1 to n-1)
The Number value may be 50 or 51 or 52.
The P value starts from Number, upto 50,
each time decreases by 1.
So Possible outputs are as follows:
As the output 51#50# is available in given answers, so 51#50# is the answer.) 2008 Delhi: 1.b) Name the header files that shall be needed for the following code:
Ans) iomanip.h, iostream.h
CBSE Computer Science Solved Revision Tour By Mr. Ravi Kiran ( mrkdata@yahoo.com ) |