Difference between &p and p | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

Difference between &p and p

void main(){ int x = 12; int* p = &x; cout << &p << endl; cout << p << endl; } why the output is different??

16th Jun 2017, 9:58 AM
Anonymous
Anonymous - avatar
2 ответов
+ 1
the first line prints the address of pointer p.. the second line prints the address of x
16th Jun 2017, 10:02 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
0
thank you ❤
16th Jun 2017, 10:03 AM
Anonymous
Anonymous - avatar