#include <stdio.h>
void prints(char *p){
if(*p != '\0') prints(++p);
if(*p != '\0') printf("%c",*p);
}
int main(void){
char p[] = "hello";
prints(p);
printf("\n");
return 0;
}
程序运行结果如下:
F:\test>gcc -g -o test.exe test.c
F:\test>test.exe
olle
输入结果少了h,不理解为什么,求大神帮忙解释一下,在此跪谢!