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.

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты