Study the following program and select the possible output(s) from the options (i) to (iv) following it. Also; write the maximum and the minimum values that, can be ·assigned to the variable VAL
Note:
-Assume all required header files are already being included in the program.
- random(n) function generates all integer 6, and n-1.
void main ()
{
randomize();
int VAL;
VAL=random(3)+2;
char GUESS[] ="ABCDEFGHIJK";
for(int I = 1, I = 1;I <= VAL; I++)
{
for (int J=VAL; J<= 7; J++)
cout<<GUESS[J];
cout<<endl;
}
}
1)
2)
3)
4)
Advertisement Remove all ads
Solution
Concept: Concept of Object Oriented Programming in C++
Is there an error in this question or solution?
Advertisement Remove all ads
APPEARS IN
Advertisement Remove all ads
Advertisement Remove all ads