enum colors {BLACK,BLUE,GREEN}
main()
{

printf("%d..%d..%d",BLACK,BLUE,GREEN);

return(1);
}

Answers were Sorted based on User's Feedback



enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); ..

Answer / surenda pal singh chouhan

0..1..2

Explanation:
enum assigns numbers starting from 0, if not explicitly
defined

Is This Answer Correct ?    31 Yes 0 No

enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); ..

Answer / kripal singh thakur

0..1..2

Is This Answer Correct ?    9 Yes 0 No

enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); ..

Answer / paresh

0,1,2

Is This Answer Correct ?    10 Yes 3 No

enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); ..

Answer / vignesh1988i

the ascii values of B,B,G will be printed..............
since these black,blue and green are strings given directly
in the printf statements..... so the base address will be
going to the function definition of printf......

Is This Answer Correct ?    0 Yes 13 No

Post New Answer

More C Interview Questions

enum day = { jan = 1 ,feb=4, april, may} what is the value of may? a)4 b)5 c)6 d)11 e)none of the above

8 Answers   HCL, Wipro,


what is unsigened char and what is the difference from char

2 Answers  


what is c?

7 Answers   Tech Mahindra,


Is calloc better than malloc?

0 Answers  


what is the difference between procedure oriented and object oriented progaming language

1 Answers  






int a[3][5]={ {1,2,3,4,5],{2,3,4,5,6},{10,11,12,13,14}}; int *p=&a; printf(ā€œ%dā€,*(*(x+1)+3));

2 Answers   Wipro,


Can you think of a logic behind the game minesweeper.

0 Answers  


Do you know the difference between malloc() and calloc() function?

0 Answers  


What are the types of arrays in c?

0 Answers  


int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;

0 Answers  


Is the exit() function same as the return statement? Explain.

0 Answers   Agilent, ZS Associates,


code for copying two strings with out strcpy() function.

6 Answers  


Categories