Observe the function prototype below:
void printSomething(int[]);
Based on the parameter, what is this function expecting?
A. A single element of an array
B. An array address ("pass by reference")
C. An entire array ("pass by value")
D. The size of an array
The correct answer is B.
All arrays are passed by reference in C++.
Comments
Leave a comment