The function call below is designed to return, in variable result, the product of x and y. All the variables are of type int. What is the correct prototype for such a function? myFunction(&result, &x, &y);
A.
void myFunction(int, int, int) ;
B.
void myFunction(int *, int *, int *) ;
C.
void myFunction(const int *, const int *, const int *) ;
D.
void myFunction(int *, const int *, const int *) ;
The function call below is designed to return, in variable result, the product of x and y. All the variables are of type int. What is the correct prototype for such a function? myFunction(result, x, y);
A.
void myFunction(int &, int, int) ;
B.
void myFunction(int, int, int) ;
C.
void myFunction(const int *, const int, const int) ;
D.
void myFunction(int *, const int *, const int *) ;
Identify the correct prototype for a function that receives an array of doubles, computes the sum of all the elements of the array, and returns the sum to the calling function.
A.
void computeSum(double array[], int size, double * sum);
B.
void computeSum(double array[], int size, double & sum);