-
What will be the output of the following C code?
#include <stdio.h>
int main()
{
printf("%d", num++);
}
int num = 15;
-
- 15
- Garbage value
- Runtime Error
- Compilation Error
- None of these
Correct Option: D
Compilation Error
main.c: In function ‘main’:
main.c:4:22: error: ‘d’ undeclared (first use in this function)
printf("%d", d++);
^
main.c:4:22: note: each undeclared identifier is reported only once for each function it appears in