1.

Look at the following C++ code and find the possible outputs (s) from the options (i) to (iv) following it. Also, write the maximum values that can be assigned to each of the variables N and M.Note: Assume all the required header files are already being included in the code. The function random(n) generates an integer between 0 and n-1.void main (){random(3), M = random (4);int N = random (3), M = random (4);int DOCK [3][3] = {{1,2,3},{2,3,4},{3,4,5}};cout <<end1;}}

Answer»

Possible Outputs:

(ii) and (iii)

Maximum value of N is 2.

Minimum value of N is 0.

Maximum value of M is 3.

Minimum value of M is 0.



Discussion

No Comment Found

Related InterviewSolutions