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??

6/16/2017 9:58:22 AM

Anonymous

2 Answers

New Answer

+1

the first line prints the address of pointer p.. the second line prints the address of x

0

thank you ❤