MENU
Question -

Observe the following program and find out, which output(s) out of (i) to (iv) will not expected from the program ? What will be the minimum and the maximum value assigned to the variable chance ?

#include
#include 
void main()
{
randomize()
int Game[]=(10,16),P; 
int Turns=random(2)+5; 
for(int T=0;T<=2;T++)
{
P=random(2);



Answer -

Option 1:
None of the outputs are correct Variable named chance does not exist in the program, hence no minimum and maximum values for it.
OR
Option 2 :
Error in question OR
Option 3: Assuming
Cout<
 
 
Since out of the above possible outputs only option (ii) is correct, hence The outputs not ! expected from the program are (i) (iii) and (iv)

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
×