69,382
社区成员
发帖
与我相关
我的任务
分享
#include <stdio.h>
#include <string.h>
int main()
{
char s[100];
char *p = s;
printf("input a string:");
gets(s);
while(*p)
p++;
//上面的操作之后,p指向'\0',p--是为了让p指向邮箱字符串的末尾
p--;
while(p>=s)
{
printf("%c",*p);
p--;
}
putchar(10);
return 0;
}