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 main () in c language?
there is two conditions , 1. while using for loop for printing 1 to 50 no's simulteneous 2. while using printf functios for printing 1 to 50 no's simulteneous with or without using variables who will take more time for compiling and execution? explain in details with reason?
When we use void main and int main?
What is C language ?
Write a program of prime number using recursion.
how to swap four numbers without using fifth variable?
Write a C Programm.. we press 'a' , it shows the albhabetical number is 1, if we press 'g' it shows the answer 7.. any can help me
write a c program to find largest of three numbers using simple if only for one time.
What is the difference between void main and main in c?
Is array name a pointer?
What is putchar() function?
What is difference between scanf and gets?