#include <stdio.h> int main() { char a[100]; gets(a); char c; c=getchar(); for(i=0;a[i]!='\0';++i) if(a[i]!='c') printf("%c",a[i]); } /* Main.c: In function 'main': Main.c:5:4: warning: 'gets' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations] gets(a); ^ Main.c:8:8: error: 'i' undeclared (first use in this function) for(i=0;a[i]!='\0';++i) ^ Main.c:8:8: note: each undeclared identifier is reported only once for each function it appears in Main.c:6:9: warning: variable 'c' set but not used [-Wunused-but-set-variable] char c; ^ */ |
Double click to view unformatted code.