#include <stdio.h> int main(void) { int A,B; scanf("%d ",&a); scanf("%d ",&b); printf(A+B); return 0; } /* Main.c: In function 'main': Main.c:5:18: error: 'a' undeclared (first use in this function) scanf("%d ",&a); ^ Main.c:5:18: note: each undeclared identifier is reported only once for each function it appears in Main.c:6:18: error: 'b' undeclared (first use in this function) scanf("%d ",&b); ^ Main.c:7:14: warning: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion] printf(A+B); ~^~ In file included from Main.c:1: /usr/include/stdio.h:332:43: note: expected 'const char * restrict' but argument is of type 'int' extern int printf (const char *__restrict __format, ...); ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ */ |
Double click to view unformatted code.