把一个字符串中的字符从小写转为大写,无法运行,求大神解决
# include <stdio.h>void uppers(char *s, char *us)
{
for(; *s!='\0'; s++,us++)
{
if(*s>='a' && *s<='z')
*us = *s-32;
else
*us = *s;
}
*us = '\0';
}
int main(void)
{
char *s, *us;
char ss[20];
printf("Please input a string: ");
scanf("%s", ss);
s = ss;
uppers(s, us);
printf("The result is: %s\n", us);
return 0;
}