Advertisement Remove all ads

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 - Computer Science (C++)

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
Advertisement Remove all ads
Advertisement Remove all ads
Share
Notifications

View all notifications


      Forgot password?
View in app×