简单的倒叙应用---倒序打印字符串(C语言)
void reverseStr(char* str){
if(*str=='\0'){
return;
}
reverseStr(str+1);
printf("%c\n",*str);
}
void test(){
char * str = "abcdefg";
reverseStr(str);
}
int main(){
test();
}
void reverseStr(char* str){
if(*str=='\0'){
return;
}
reverseStr(str+1);
printf("%c\n",*str);
}
void test(){
char * str = "abcdefg";
reverseStr(str);
}
int main(){
test();
}