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

write a c program to Reverse a given string using string function and also without string function

1 Answers  


main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

2 Answers  


How will u find whether a linked list has a loop or not?

8 Answers   Microsoft,


main() { int i = 258; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }

1 Answers  


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

3 Answers   Wipro,


Write a C program to print ‘Campus Force training’ without using even a single semicolon in the program.

3 Answers   Wipro,


#include<stdio.h> main() { register i=5; char j[]= "hello"; printf("%s %d",j,i); }

2 Answers  


#include <stdio.h> int main(void) { int a=4, b=2; a=b<<a+b>>2 ; printf("%d",a); return 0; }

0 Answers   Student,


Write a program using one dimensional array to assign values and then display it on the screen. Use the formula a[i]=i*10 to assign value to an element.

1 Answers   Samar State University,


#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }

1 Answers  


how to return a multiple value from a function?

2 Answers   Wipro,


find simple interest & compund interest

2 Answers  


Categories