-
What will be the output of the following C code?
#include <stdio.h>
int calc(int, int);
#define calc(p, q) p / q + p
int main()
{
int a = -17, b = 12;
printf("%d ",calc(a + b, 12));
#undef calc
printf("%d\n",calc(a + b, 12));
}
int calc(int p, int q)
{
return p / q + p;
}
-
- Compilation Error
- -17 12
- -21 -5
- Garbage value
- None of these
Correct Option: C
-21 -5