main()

{

int i=3;

switch(i)

{

default:printf("zero");

case 1: printf("one");

break;

case 2:printf("two");

break;

case 3: printf("three");

break;

}

}



main() { int i=3; switch(i) { default:printf("zero"); c..

Answer / susie

Answer : :

three

Explanation :

The default case can be placed anywhere inside
the loop. It is executed only when all other cases doesn't
match.

Is This Answer Correct ?    18 Yes 3 No

Post New Answer

More C Code Interview Questions

main() { char a[4]="HELLO"; printf("%s",a); }

3 Answers   CSC,


main() { 41printf("%p",main); }8

1 Answers  


main() { int i; clrscr(); for(i=0;i<5;i++) { printf("%d\n", 1L << i); } } a. 5, 4, 3, 2, 1 b. 0, 1, 2, 3, 4 c. 0, 1, 2, 4, 8 d. 1, 2, 4, 8, 16

4 Answers   HCL,


how to return a multiple value from a function?

2 Answers   Wipro,


char inputString[100] = {0}; To get string input from the keyboard which one of the following is better? 1) gets(inputString) 2) fgets(inputString, sizeof(inputString), fp)

1 Answers  






main() { int i, j; scanf("%d %d"+scanf("%d %d", &i, &j)); printf("%d %d", i, j); } a. Runtime error. b. 0, 0 c. Compile error d. the first two values entered by the user

2 Answers   HCL,


Set up procedure for generating a wire frame display of a polyhedron with the hidden edges of the object drawn with dashed lines

0 Answers   IBM,


main() { int i; i = abc(); printf("%d",i); } abc() { _AX = 1000; }

2 Answers  


program to find the roots of a quadratic equation

14 Answers   College School Exams Tests, Engineering, HP, IIIT, Infosys, Rajiv Gandhi University of Knowledge Technologies RGUKT, SSC,


How to read a directory in a C program?

4 Answers  


Find the largest number in a binary tree

7 Answers   Infosys,


main() { int y; scanf("%d",&y); // input given is 2000 if( (y%4==0 && y%100 != 0) || y%100 == 0 ) printf("%d is a leap year"); else printf("%d is not a leap year"); }

1 Answers  


Categories