A pointer question
Posted on 2006-05-26
I am learning C and I am totally confused with this sample from the book.
printf("addr of data is %x\n",data);
printf("values are %x,%x,%x,%x,\n",data,data,data,data);
printf("s contains %x, dereferences to %x\n",s,*s);
printf("w contains %x, dereferences to %x\n",w,*w);
The output in my PC is:
addr of data is 22eea4
values are 78,56,35,12,
s contains 22eea6, dereferences to 1235
w contains 22eea4, dereferences to 12355678
Suppose I know the addr of data(22eea4 in this case), what's the hell the left three line coming from? How to get their values?
Thanks a lot.