Which symbol should be used to pass the object by reference in C++?

Julipkq

New member
Which symbol should be used to pass the object by reference in C++?
A. &
B. @
C. $
D. $ or &
 
Answer: a
Explanation: The object to be passed by reference to the function should be preceded by & symbol in the argument list syntax of the function. This indicates the compiler not to use new object. The same object which is being passed have to be used.
 

Tìm kiếm

Back
Top