Observe the following code:
std::cout << grades[1];
Which grade will be output to the screen?
A: The first grade.
B: The second grade.
C: All grades in the array.
D: Invalid code / Error.
Answer B.
This statement will print the second grade, as arrays are started indexing from zero in C++
Comments
Leave a comment