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



main() { enum{red,green,blue=6,white}; pf("%d%d%d%d", red,green,blue,white); return 0;..

Answer / aswini

how ur answer is c.can u explain that???
i think its b...

Is This Answer Correct ?    19 Yes 1 No

main() { enum{red,green,blue=6,white}; pf("%d%d%d%d", red,green,blue,white); return 0;..

Answer / rajesh

Answer : b

check it in www.codepad.org

Is This Answer Correct ?    5 Yes 0 No

main() { enum{red,green,blue=6,white}; pf("%d%d%d%d", red,green,blue,white); return 0;..

Answer / saiteja

0167

Is This Answer Correct ?    2 Yes 0 No

main() { enum{red,green,blue=6,white}; pf("%d%d%d%d", red,green,blue,white); return 0;..

Answer / niranjan kumar niraj

d)none of the above

Is This Answer Correct ?    3 Yes 2 No

main() { enum{red,green,blue=6,white}; pf("%d%d%d%d", red,green,blue,white); return 0;..

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

main() { enum{red,green,blue=6,white}; pf("%d%d%d%d", red,green,blue,white); return 0;..

Answer / kalai

c

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More C Interview Questions

How do you convert strings to numbers in C?

0 Answers  


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.'%')

23 Answers  


what is the different bitween abap and abap-hr?

0 Answers   TCS,


Identify the correct argument for the function call fflush () in ANSI C: A)stdout B)stdin C)stderr D)All the above

5 Answers   Accenture, TCS,


What is time complexity c?

0 Answers  






why should i select you?

21 Answers   Wipro,


What is putchar() function?

0 Answers  


what does data structure mean?

8 Answers  


What is the use of define in c?

0 Answers  


Explain c preprocessor?

0 Answers  


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"

1 Answers  


Explain the term printf() and scanf() used in c language?

0 Answers  


Categories