#include<stdio.h>
int main(void){
int *ptr,a,b;
a = ptr;
b = ptr + 1;
printf("the vale of a,b is %x and %x respectively",a,b);
int c,d;
c = 0xff;
d = c + 1;
printf("the value of c d are %x and %x respectively",c,d);
return 0;
}
输出值为
the vale of a,b is 57550c90 and 57550c94 respectively
the value of c d are ff and 100 respectively%
事实证明 ptr + 1 实际上,为什么它会这样?