-
What will be the output of the following C function?
#include <stdio.h>
enum car {AstonMartin, Audi, Chevrolet, Ferrari};
enum color {Yellow = 5, Green, RedBlue, Blue};
int main()
{
enum car c = Yellow;
int i;
i = c;
printf("%d\n", i);
return 0;
}
-
- Compilation Error
- Yellow
- AstonMartin
- 5
- Runtime Error
Correct Option: D
c is an integer constant, hence it is compatible.