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 |
How do you convert strings to numbers in C?
if a five digit number is input through the keyboard, write a program to calculate the sum of its digits. (hint:-use the modulus operator.'%')
what is the different bitween abap and abap-hr?
Identify the correct argument for the function call fflush () in ANSI C: A)stdout B)stdin C)stderr D)All the above
What is time complexity c?
why should i select you?
What is putchar() function?
what does data structure mean?
What is the use of define in c?
Explain c preprocessor?
Write a program that accepts a string where multiple spaces are given in between the words. Print the string ignoring the multiple spaces. Example: Input: “ We Are Student “ Output: "We Are Student"
Explain the term printf() and scanf() used in c language?