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 |
Which header file is used for clrscr?
what is the difference between static variable and register variable?
What is the difference between CV and Resume ?
fn f(x) { if(x<=0) return; else f(x-1)+x; }
Explain what is the benefit of using #define to declare a constant?
What are external variables in c?
main() { intj; while9j<=10) { printf("\n%d",j); j=j+1; } }
Which are low level languages?
Difference between Function to pointer and pointer to function
How do you determine whether to use a stream function or a low-level function?
wats the diference btwen constant pointer and pointer to a constant.pls give examples.
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.