Google News
logo
CPP - Quiz(MCQ)
What will happen while using pass by reference?
A)
The function declaration should contain $
B)
The function declaration should contain ampersand (& in its type declaration)
C)
The values of those variables are passed to the function so that it can manipulate them
D)
The location of variable in memory is passed to the function so that it can use the same memory area for its processing

Correct Answer :   The location of variable in memory is passed to the function so that it can use the same memory area for its processing


Explanation : In pass by reference, we can use the function to access the variable and it can modify it. Therefore we are using pass by reference.

Advertisement