prog.c: In function ‘main’:
prog.c:10:2: warning: ‘gets’ is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
gets(a);
^
prog.c:10:2: warning: passing argument 1 of ‘gets’ from incompatible pointer type [enabled by default]
In file included from prog.c:1:0:
/usr/include/stdio.h:638:14: note: expected ‘char *’ but argument is of type ‘int *’
extern char *gets (char *__s) __wur __attribute_deprecated__;
^
prog.c:11:2: warning: ‘gets’ is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
gets(b);
^
prog.c:11:2: warning: passing argument 1 of ‘gets’ from incompatible pointer type [enabled by default]
In file included from prog.c:1:0:
/usr/include/stdio.h:638:14: note: expected ‘char *’ but argument is of type ‘int *’
extern char *gets (char *__s) __wur __attribute_deprecated__;
^
prog.c:12:2: warning: ‘gets’ is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations]
gets(c);
^
prog.c:12:2: warning: passing argument 1 of ‘gets’ from incompatible pointer type [enabled by default]
In file included from prog.c:1:0:
/usr/include/stdio.h:638:14: note: expected ‘char *’ but argument is of type ‘int *’
extern char *gets (char *__s) __wur __attribute_deprecated__;
^
prog.c:13:2: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int *’ [-Wformat=]
printf("%s\n",a);
^
prog.c:14:2: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int *’ [-Wformat=]
printf("%s\n",b);
^
prog.c:15:2: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int *’ [-Wformat=]
printf("%s\n",c);
^
prog.c:16:2: warning: passing argument 1 of ‘strlen’ from incompatible pointer type [enabled by default]
int la = strlen(a);
^
In file included from prog.c:2:0:
/usr/include/string.h:395:15: note: expected ‘const char *’ but argument is of type ‘int *’
extern size_t strlen (const char *__s)
^
prog.c:17:2: warning: passing argument 1 of ‘strlen’ from incompatible pointer type [enabled by default]
int lb = strlen(b);
^
In file included from prog.c:2:0:
/usr/include/string.h:395:15: note: expected ‘const char *’ but argument is of type ‘int *’
extern size_t strlen (const char *__s)
^
prog.c:18:2: warning: passing argument 1 of ‘strlen’ from incompatible pointer type [enabled by default]
int lc = strlen(c);
^
In file included from prog.c:2:0:
/usr/include/string.h:395:15: note: expected ‘const char *’ but argument is of type ‘int *’
extern size_t strlen (const char *__s)
^
prog.c:22:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
for(int i = 0;i<la;i++){
^
prog.c:22:2: note: use option -std=c99 or -std=gnu99 to compile your code