View Code of Problem 1

void hh()
{
  scanf("%d %d",&a,&b);
printf("%d",a+b);
}
/*
Main.c: In function 'hh':
Main.c:3:3: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   scanf("%d %d",&a,&b);
   ^
Main.c:3:3: warning: incompatible implicit declaration of built-in function 'scanf'
Main.c:3:18: error: 'a' undeclared (first use in this function)
   scanf("%d %d",&a,&b);
                  ^
Main.c:3:18: note: each undeclared identifier is reported only once for each function it appears in
Main.c:3:21: error: 'b' undeclared (first use in this function)
   scanf("%d %d",&a,&b);
                     ^
Main.c:4:1: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
 printf("%d",a+b);
 ^
Main.c:4:1: warning: incompatible implicit declaration of built-in function 'printf'
*/

Double click to view unformatted code.


Back to problem 1