編寫一個函數,用來刪除字符串中的空格

程序代碼 #include<stdio.h> #include<stdlib.h> void fun(char *str) { char *p=str; int i=0; while(*p) { if(*p!=' ') str[i++]=*p; p++; } str[i]='\0'; } int main() { char str[81]; char Msg[]="I
相關文章
相關標籤/搜索