#include <stdio.h>
#define LEN 5
char buf[LEN] = {'a','b','c','d','e'};
void print_backward(int pos)
{
if(pos == LEN)
return;
print_backward(pos + 1);
putchar(buf[pos]);
}
int main()
{
print_backward(0);
putchar('\n');
return 0;
}
用递归实现倒序打印
最新推荐文章于 2024-06-29 18:18:35 发布