MCQ
Single Best Answer
Not Set
QWhat is the output of this C code?
#include
enum birds {SPARROW, PEACOCK, PARROT};
enum animals {TIGER = 8, LION, RABBIT, ZEBRA};
int main()
{
enum birds m = TIGER;
int k;
k = m;
printf("%d\n", k);
return 0;
}
ID: #1363
Constant in C Language
14,620 views
Question Info
#1363Q ID
Not SetDifficulty
Constant in C LanguageTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option D
Explanation
Answer:d
m is an integer constant, hence compatible. Output:
m is an integer constant, hence compatible. Output:
$ cc pgm5.c $ a.out 8
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic