今天身体不适,简单接触了点指针
#include<stdio.h>
void upCopy(char *neW,char *old)
{
while(*old!='\0')
{
if(*old>='A'&&*old<='Z')
*neW++=*old;
old++;
}
*neW='\0';
}
main()
{
char s1[100],s2[]="I Love You",*p1,*p2;
p1=s1;
p2=s2;
upCopy(p1,p2);
printf("The old string is :%s\n",s2);
printf("The new string is :%s\n",s1);
}