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 |
What is 'bus error'?
Why we not create function inside function.
helllo sir , what is the main use of the pointer ,array ,and the structure with the example of a programe
What is #pragma directive?how it is used in the program? what is its advantages and disadvantages?
int *a[5] refers to
What is the scope of global variable in c?
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
write a program in c to find out the sum of digits of a number.but here is a condition that compiler sums the value from left to right....not right to left..
write a function to find whether a string is palindrome or not and how many palindrome this string contain?
Explain what math functions are available for integers? For floating point?
Explain can static variables be declared in a header file?
What does %f mean c?