I am having difficulty understanding this guide\'s code on pointers in C. I thought that you needed an ampersand to reference the address of a pointer, but the guide\'s code
you used
int var = 20;
int *ip;
ip = &var;
and you printed &var, ip, &ip *ip
Here &var and ip will indicate the address of the memory where 20 is saved.
And *ip will indicate the value 20.
And the most important thing what you wanted is &ip.
When int *ip is called, the memory region for this variable will be created.
so ip occupy some memory region.
When you print &ip, then this will indicate the memory address where ip(contains the address of var) is saved.