MCQ
Single Best Answer
Not Set
QWhat is the output of this C code?
#include
int main()
{
enum {ORANGE = 5, MANGO, BANANA = 4, PEACH};
printf("PEACH = %d\n", PEACH);
}
ID: #1358
Constant in C Language
10,544 views
Question Info
#1358Q 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 C
Explanation
Answer:c
In enum, the value of constant is defined to the recent assignment from left. Output:
In enum, the value of constant is defined to the recent assignment from left. Output:
$ cc pgm1.c $ a.out PEACH = 5
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic