main()
{
enum{red,green,blue=6,white};
pf("%d%d%d%d", red,green,blue,white);
return 0;
}
a)0 1 6 2
b)0 1 6 7
c)Compilation error
d)None of the above
Answers were Sorted based on User's Feedback
Answer / aswini
how ur answer is c.can u explain that???
i think its b...
| Is This Answer Correct ? | 19 Yes | 1 No |
Answer / nitin.ramola
An enum is a user-defined type consisting of a set of named
constants called enumerators. The colors of the rainbow
would be mapped like this.:
enum rainbowcolors {
red,
orange,
yellow,
green,
blue,
indigo,
violet)
}
Now internally, the compiler will use an int to hold these
and if no values are supplied, red will be 0, orange is 1 etc.
| Is This Answer Correct ? | 1 Yes | 0 No |
Write a c program to build a heap method using Pointer to function and pointer to structure ?
0 Answers MAHINDRA, Protech, Sivan Tech,
How can I handle floating-point exceptions gracefully?
what is a static function
When should the register modifier be used? Does it really help?
What is echo in c programming?
What is the 'named constructor idiom'?
Explain zero based addressing.
The operation of a stair case switch best explains the a) or operation b) and operation c)exclusive nor operation d)exclusive or operation Which of the following is/are syntactically correct? a) for(); b) for(;); c) for(,); d) for(;;);
1 Answers HCL, Public Service Commission,
What does dm mean sexually?
What is the purpose of clrscr () printf () and getch ()?
program to find the second largest word in a paragraph amongst all words that repeat more thn twice
Do pointers take up memory?