/* 题目要求: 替换空格。 we are happy。 we%20are%20happy。 算法解析: 字符串长度为14. 先计算有多少个空格,测试字符串为2个。这样总长度为18. 从最后一个字符向后移动,注意控制指针,空格是1个字符,%20是三个。 */ #include <stdio.h> void replaceStr(char str[]) { int count_space = 0; int str_length = 0; for (int i = 0; str[i] != '