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",B..

Answer / susie

Answer :

0..1..2

Explanation:

enum assigns numbers starting from 0, if not
explicitly defined.

Is This Answer Correct ?    5 Yes 0 No

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

Answer / ana

0,1,2

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Code Interview Questions

int i; main(){ int t; for ( t=4;scanf("%d",&i)-t;printf("%d\n",i)) printf("%d--",t--); } // If the inputs are 0,1,2,3 find the o/p

2 Answers  


main() { int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); printf("%d, %d ", j++ , ++i); } a. 20, 10, 20, 10 b. 20, 9, 20, 10 c. 20, 9, 19, 10 d. 19, 9, 20, 10

4 Answers   HCL,


func(a,b) int a,b; { return( a= (a==b) ); } main() { int process(),func(); printf("The value of process is %d !\n ",process(func,3,6)); } process(pf,val1,val2) int (*pf) (); int val1,val2; { return((*pf) (val1,val2)); }

1 Answers   Satyam,


Is this code legal? int *ptr; ptr = (int *) 0x400;

1 Answers  


why the range of an unsigned integer is double almost than the signed integer.

1 Answers  






Write a routine to implement the polymarker function

0 Answers   TCS,


Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number

2 Answers   Ace Info,


void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest)); }

2 Answers  


main() { { unsigned int bit=256; printf("%d", bit); } { unsigned int bit=512; printf("%d", bit); } } a. 256, 256 b. 512, 512 c. 256, 512 d. Compile error

1 Answers   HCL,


write a program to count the number the same (letter/character foreg: 's') in a given sentence.

2 Answers  


main() { char not; not=!2; printf("%d",not); }

1 Answers  


#define a 10 int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } void foo() { #undef a #define a 50 }

3 Answers  


Categories