懂的人帮帮忙啊,这个程序
/* 本程序实现从字符串s中删除字符c */#include<stdio.h>
#define MAXSIZE 1000
char squeeze(char s[],char c)
{
int i,j;
for(i = j = 0;s[i] != '\0';i++)
if (s[i] != c)
s[j++] = s[i];
s[j] = '\0';
return s[j];
}
int main()
{
char a[MAXSIZE];
char b;
int i = 0;
while((b = getchar()) != EOF)
{
a[i] = b;
i++;
}
squeeze(a,'b');
while(a[i] != EOF)
{
putchar(a[i]);
i++;
}
return 0;
}
哪里出问题了,运行不像我想的一样啊??怎么改,懂的人说一下,谢谢了