1. 使用两个指针
1 #include <cstdio> 2 #include <cstring> 3 4 char *reverse_str(char *str) 5 { 6 if (str == NULL || *str == '