Question #328396

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


Expert's answer

The correct answer is B.

All arrays are passed by reference in C++.


LATEST TUTORIALS
APPROVED BY CLIENTS