main() { char a[]={'a','b','c','d'}; char *p=(char *)(&a+1); printf("%c","%c",*(a+1),*(p-1)); }

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 01:10:57
main(){chara[]={''a'',''b'',''c'',''d''};char*p=(char*)(&a+1);printf("%c","%c",*(a+1),*(p-1));}main(){chara[

main() { char a[]={'a','b','c','d'}; char *p=(char *)(&a+1); printf("%c","%c",*(a+1),*(p-1)); }
main() { char a[]={'a','b','c','d'}; char *p=(char *)(&a+1); printf("%c","%c",*(a+1),*(p-1)); }

main() { char a[]={'a','b','c','d'}; char *p=(char *)(&a+1); printf("%c","%c",*(a+1),*(p-1)); }
b,d
char *p=(char *)(&a+1); 把a当成一个数据结构4个字节,所以p是在'd'后面的一个字节位置