-
What will be the output of the following C code?
#include <stdio.h>
#define MAX 3
enum car {AstonMartin = MAX + 1, Audi = AstonMartin + MAX};
int main()
{
enum car c = Audi;
printf("%d\n", c);
return 0;
}
-
- 3
- Compilation Error
- 7
- Runtime Error
- None of these
Correct Option: C
MAX value is 3 and hence Audi will have value 4 + 3.