Given the following declarations:

T obj;
void foo(T *);
Which options of a function call we use?
Explanation
T * in function declaration means pointer to the object of type T, that's why pointer (i.e. address of the variable) should be passed as a parameter. The & operator allows us to get the address, and foo(&obj) is a correct option therefore.
C++
C++ Quiz
Start Quiz

or Read more about C++ Quiz

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback