Question:
Study the following program and select the possible output(s) from the option (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 inthe program.
- random(n) function generates an integer between 0 and n-1.
void main()
{
randomize();
int VAL;
VAL=random(3)+2;
char GUESS[]="ABCDEFGHIJK";
for (int I=l;I<=VAL;I++)
{
for(int J=VAL;J<=7;J++)
cout«GUESS[J];
cout«endl;
}
}
(i) (ii) (iii) (iv)
BCDEFGH CDEFGH EFGH FGHI
BCDEFGH CDEFGH EFGH FGHI
EFGH FGHI
EFGH FGHI
C. Sir| Created: 8-Jan-2019 | Updated: 22-Mar-2026|CBSE12A-2015
