#include <stdio.h>
#include <stdlib.h>
#define N 100
void upCopy(char *,char *);
int main()
{
char *p;
p=malloc(N+1);
char *q;
q=malloc(strlen(p)+1);
printf("请输入一个
字符串:");
gets(p);
upCopy(q,p);
printf("%s",q);
system("pause");
}
void upCopy(char *NEW,char *OLD)
{
for(;*OLD;OLD++){
if (*OLD>='A' && *OLD<='Z')
continue;
*NEW++=*OLD;}
*NEW='\0';
}
本回答被提问者和网友采纳