【题目】:将字符串a复制为字符串b,然后输出字符串b。(使用指针变量来完成)
#include<stdio.h>
int main()
{
char a[]="I am a student!",b[20];
char *p1=a,*p2=b;
for(;*p1!='\0';p1++,p2++)
*p2=*p1;
*p2='\0';
printf("The string a is: %s\n",p1);
printf("The string b is: %s\n",p2);
return 0;
}