I made some code, for understanding the concept/basic of pointer:
int a=1;
int *b=&a;
int **c = &b;
int ***d = &c;
cout << &*(&*d) << endl;
Why does &*(&*d) return address of "c" instead of address of "b"?
I’ve also tried code like &*(&*(&*(&*(&*d)))), but it keep return address of "c"
Because the
&*cancels each other out.*dereferencedwhich gives the value ofc. And then&gives the address ofc, or the value ofd.