Linux 系统编程实战——指针(一些有意思的代码)

                  

                

 1 #include<stdio.h>
 2 #include<string.h>
 3 #include<stdlib.h>
 4 
 5 void reverse(char *p) {
 6    if('' == *p) {
 7          return;
 8     }     
 9    
10    reverse(p+1); //这里不可以用++p,第一次p就会被赋值为e,所以最后输出为 olle,h不会被输出
11    printf("%c", p);
12 }
13 
14 int main() {
15    reverse("Hello");
16    
17    return 0;
18 }

                

原文地址:https://www.cnblogs.com/AI-Cobe/p/10249830.html