prog.c: In function ‘main’:
prog.c:6:15: warning: passing argument 2 of ‘fgets’ makes integer from pointer without a cast [-Wint-conversion]
fgets ("%c", &x);
^
In file included from prog.c:1:0:
/usr/include/stdio.h:624:14: note: expected ‘int’ but argument is of type ‘char *’
extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
^~~~~
prog.c:6:2: error: too few arguments to function ‘fgets’
fgets ("%c", &x);
^~~~~
In file included from prog.c:1:0:
/usr/include/stdio.h:624:14: note: declared here
extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
^~~~~
prog.c:7:18: warning: passing argument 2 of ‘fgets’ makes integer from pointer without a cast [-Wint-conversion]
fgets ("%d %d", &a, &b);
^
In file included from prog.c:1:0:
/usr/include/stdio.h:624:14: note: expected ‘int’ but argument is of type ‘int *’
extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
^~~~~
prog.c:7:22: warning: passing argument 3 of ‘fgets’ from incompatible pointer type [-Wincompatible-pointer-types]
fgets ("%d %d", &a, &b);
^
In file included from prog.c:1:0:
/usr/include/stdio.h:624:14: note: expected ‘FILE * restrict {aka struct _IO_FILE * restrict}’ but argument is of type ‘int *’
extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
^~~~~
prog.c:8:6: error: ‘axb’ undeclared (first use in this function)
c = axb
^~~
prog.c:8:6: note: each undeclared identifier is reported only once for each function it appears in
prog.c:9:2: error: expected ‘;’ before ‘printf’
printf ("%d%c%d = %d", &a, &x, &b, &c);
^~~~~~
prog.c:5:12: warning: variable ‘c’ set but not used [-Wunused-but-set-variable]
int a, b, c;
^