Reverse String
本程序的问题描述:编写一个递归函数,实现将输入的任意长度的字符串反向输出的功能。
例如:输入abc 输出:cba
// 在本程序中我所面临的问题有:这个程序我真的没有看懂,执行流程我就没有明白
#include <stdio.h>
void print()
{
char a;
scanf("%c",&a);
//我们将#作为递归输入的一个结束条件
if(a != '#') print();
if(a != '#') printf("%c",a);
}
int main()
{
print();
}