分类：电脑/网络-程序设计-C/C++
问题：把一字符串中的小写c去掉,高手帮我改错啊#include"std 
#include"std.h" fun(char *s) {int i=0;char *b; for(;i!='\0';i++) if(s[i]=='c') b=s+i+1; return b } main() {char *s; printf("input s:"); scanf("%s",s); printf("the string is %s",fun(s)); } 当我输入cbcbcbfc时,它输出两个笑脸,请求高手指点! 
回答：#include"stdio.h"
#include"string.h"
void main()
{char s[100];
printf("input s:");
scanf("%s",s);
printf("the string is ");
char *b,*pre=s;
while(*pre)
{
b=strstr(pre,"c");
*b=0;
printf("%s",pre);
b++;
pre=b;
}
printf("\n");
}