用递归法将一个字符串在内存中反序排列后输出
程序代码:#include"stdio.h"
int main()
{char xixu(char *s,char *p);
char s[20].*p;
scanf("%s",s);
p=s;
while(*p!='\0')p++;
nixu(s,p);
return 0;
}
char nixu(char *s,char *p);
{if(p!=s)
{p--;
printf("%c",*p);
nixu(s,p);
}
else printf("%c",s[0]);
return 0;
}这样做只是逆序了,但是没有把字符串在内存中逆序。。。该怎样改呢?









