Quiz 1
What will be the output for the following C++ syntax?
1. int i=0;
for(int i=0;i<5;i++){
cout<<i<<””;
}
2. int i=0;
for(int i=0;i<3;i++){
for(int j=0;j<2;j++){
cout<<i<<j<<””;
}
1 2 3 4 5 6 7
Given the table above, Answer the following:
1. The correct declaration of an array in C++ is int arr[?];
2. What will be the result of the following C++ syntax? cout<<arr[0];
3. What will be the result of the following C++ syntax? cout<<arr[4];
1 2 3 4
5 6 7 8
Given the table above, Answer the following:
1. The correct declaration of an array in C++ is int arr[?][?];
2. What will be the value of arr[0][2]?
3. What will be the value of arr[1][3]?