I've just been learning about pointers, and out of curiosity I subtracted 1 from the address of a. Then I tried subtracting character constants.
With the help of an ascii character value table I noticed that it always subtracts 4 for every 1 integer. I can't figure this out at all, anyone know why it does this?
Output is:Code:# include<stdio.h> main() { int a, *b; a=10; b=&a; printf("&a=%d\na=%d\n(referenced)b=%d\n(unreferenced)b=%d\n", &a-1, a, b, *b); }
&a=2686724
a=10
b=2686728
*b=10