char point(char*p) {p+=3;return *P} main() {char b[4]={'a','b','c','d'},*p=b; point(p);printf("c\n"char point(char*p){p+=3;return *P}main(){char b[4]={'a','b','c','d'},*p=b;point(p);printf("c\n",*p);}求输出结果,

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/26 19:42:57
charpoint(char*p){p+=3;return*P}main(){charb[4]={''a'',''b'',''c'',''d''},*p=b;point(p);printf("c\n"charpoin

char point(char*p) {p+=3;return *P} main() {char b[4]={'a','b','c','d'},*p=b; point(p);printf("c\n"char point(char*p){p+=3;return *P}main(){char b[4]={'a','b','c','d'},*p=b;point(p);printf("c\n",*p);}求输出结果,
char point(char*p) {p+=3;return *P} main() {char b[4]={'a','b','c','d'},*p=b; point(p);printf("c\n"
char point(char*p)
{p+=3;return *P}
main()
{char b[4]={'a','b','c','d'},*p=b;
point(p);printf("c\n",*p);
}
求输出结果,

char point(char*p) {p+=3;return *P} main() {char b[4]={'a','b','c','d'},*p=b; point(p);printf("c\n"char point(char*p){p+=3;return *P}main(){char b[4]={'a','b','c','d'},*p=b;point(p);printf("c\n",*p);}求输出结果,
输出结果是a
函数返回*p也就是字母d-->point(p)
但是问的是*p当函数返回值之后里面所有的东西都释放了p还是指向之前的字母a
如果想得到字母d有2个办法
1 p+=3改成*p+=3
2 printf("c\n",*p)改成printf("c\n",point(p))