Sunday, February 17, 2008

A problem with pointer conversion

Question
int i=300;
char *ptr=&i;
*++ptr=2;
printf("%d",i);

Solution
Photobucket
Photobucket
Photobucket
Photobucket
Photobucket

No comments: