void fun(char* basestr){ if(basestr==NULL){ return; } int i=0; int j=0; while(basestr[i] != '\0'){ while(basestr[i] == ' '){ i++; } if(basestr[i-1]==' '){ basestr[j++] = ' '; } basestr[j++] = basestr[i++]; } }
http://blog.csdn.net/zhsenl/article/details/7488758
http://blog.csdn.net/thl331860203/article/details/7262097
这道题你会答吗?花几分钟告诉大家答案吧!
扫描二维码,关注牛客网
下载牛客APP,随时随地刷题