Difference between &p and p | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Respostas
+ 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