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
Зареєструйся Зараз
або Підпишись на майбутні тести