#include<stdio.h> int main() { char a[]="I am a student",*p1,*p2,b[30]; p1=a; p2=b; for(;*p1!='\0';p1++,p2++) //请楼主细心,改行少一个‘*’ *p2=*p1; *p2='\0'; printf("the string a: %s\n",a); printf("the string b: %s\n",b); return 0; }