#include <stdio.h>
#include<stdlib.h>
int main()
{
char *p;
int i=0;
int count=0;
char s[10];
printf("Input:");
p=s;
gets(s);
while(*p!='\0')
{
p++;
count++;
}
while((count-1)>=0)
{
p--;
printf("%c ",*p);
count--;
}
system("pause");
}
用指针求字符串逆序
最新推荐文章于 2021-10-24 17:42:14 发布