For Daily Free Study Material Join wiredfaculty Whatsapp Group | Download Android App | Ncert Book Download
Sponsor Area
Look at the following C++ code and find the possible output(s) from the options (i) to (iv) following it. Also, write the maximum values that can be assigned to each of the variables R and C.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() { randomize(); int R=random(3),C=random(4); int MAT[3][3] = {{10,20,30},{20,30,40},{30,40,50}}; for(int I=0; I<R; I++) { for(int J=0; J<C; J++) cout<<MAT[I][J]<<' '; cout<<endl; } }