-
What will be the output of the following C code?
#include <stdio.h>
#define Cprogram
int main()
{
int p = 21;
#ifdef Cprogram
p = 11;
printf("%d", Cprogram);
}
-
- 21
- Garbage value
- 11
- Compilation Error
- None of these
Correct Option: D
Compilation Error
main.c: In function ‘main’:
main.c:8:30: error: expected expression before ‘)’ token
printf("%d", Cprogram);
^
main.c: At top level:
main.c:6:0: error: unterminated #ifdef
#ifdef Cprogram