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

What does *p++ do?

0 Answers  


Explain what is the heap?

0 Answers  


void main() { int i=5; printf("%d",i++ + ++i); }

21 Answers   ME,


What is the explanation for the dangling pointer in c?

0 Answers  


Are local variables initialized to zero by default in c?

0 Answers  






What is the difference between call by value and call by reference in c?

0 Answers  


find the output of the following program main() { int x=5, *p; p=&x; printf("%d",++*p); }

10 Answers   Amdocs, TCS,


Just came across this question, felt worth sharing, so here it is I want you to make a C/C++ program that for any positive integer n will print all the positive integers from 1 up to it and then back again! Let's say n=5 I want the program to print: 1 2 3 4 5 4 3 2 1. Too easy you say? Okay then... You can ONLY USE: 1 for loop 1 printf/cout statement 2 integers( i and n) and as many operations you want. NO if statements, NO ternary operators, NO tables, NO pointers, NO functions!

1 Answers  


write a program to find the largest and second largest integer from an array

2 Answers   Value Labs,


can we define a function in structure?

2 Answers  


1,1,5,17,61,217,?,?.

3 Answers   Apple,


What is the code for 3 questions and answer check in VisualBasic.Net?

0 Answers   Infosys,


Categories