#include<stdio.h> int main() { char str[100],c,; gets(str); scanf("%c",&c); for(i=0;str[i]!='\0';i++){ if(str[i]!=c) printf("%c",str[i]); } return 0; } /* Main.c: In function 'main': Main.c:4:19: error: expected identifier or '(' before ';' token char str[100],c,; ^ Main.c:5:3: warning: 'gets' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations] gets(str); ^ Main.c:7:7: error: 'i' undeclared (first use in this function) for(i=0;str[i]!='\0';i++){ ^ Main.c:7:7: note: each undeclared identifier is reported only once for each function it appears in */ |
Double click to view unformatted code.