去空字符串
1 #define _CRT_SECURE_NO_WARNINGS 2 #include<stdio.h> 3 #include<string.h> 4 #include<stdlib.h> 5 6 char * removeSpace(char * arr) 7 { 8 //char temp[100]; 9 char * start = arr; 10 //字符串有效长度需要-1为数组元素下标 11 char * end = arr + strlen(arr) - 1; 12 while (*end == ' ' && end > start) 13 { 14 end--; 15 } 16 *(end + 1) = '