c实现字符串逆序
1.非递归方法#include <stdio.h>char* reverse_string(char* string){ char* start = string; char* end = string + strlen(string) - 1; for (; start < end; start++, end--) { char ch = *start; *start = *end; *end = ch; } return string;}int
原创
2022-02-27 17:09:59 ·
205 阅读 ·
0 评论