问答题

简答题 输入一字符串,按相反次序输出其中的所有字符。(要求用指针方法实现)

【参考答案】

#include "string.h"
#include "stdio.h"
main()
{char s[81],*p;
gets(s);
p=s;
while(*p='\0')p++;
if(p!=s)
do{p--;
putchar(*p);}
while(p!=s);