int a = 10;
int* b = &a;
int c = 4;
int* d = &c;
(*d)++;
d = b;
*d = c - *b;
cout << a << " " << c;
Output
5 -5
I am having difficulties understanding pointers, like I know that *something means the value its pointing at, and &something means its the address, but is it possible for someone to walk me through this question as I believe it will clear all my doubts and help me understand better.
Thanks in advance.