Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is the output of the program and explain why??
#include<stdio.h>

void main ( )

{

int k=4,j=0:

switch (k)

{

case 3;

j=300;

case 4:

j=400:

case 5:

j=500;

}

printf (“%d\n”,j);

}

Answers were Sorted based on User's Feedback



what is the output of the program and explain why?? #include<stdio.h> void main ( ) { ..

Answer / tejal

k=4 bcoz of this control directly switch to case 4 ,now i
holds the value 400 there is no any break statement after
case 4 so now control goes to case 5 and assign value of i
as 500 .now control comes out of the loop and print the
valus of i i.e. 500.

Is This Answer Correct ?    0 Yes 0 No

what is the output of the program and explain why?? #include<stdio.h> void main ( ) { ..

Answer / sathish

400

Is This Answer Correct ?    4 Yes 5 No

what is the output of the program and explain why?? #include<stdio.h> void main ( ) { ..

Answer / gollapally

400
500

Is This Answer Correct ?    2 Yes 7 No

what is the output of the program and explain why?? #include<stdio.h> void main ( ) { ..

Answer / ramprabha

0

Is This Answer Correct ?    3 Yes 9 No

Post New Answer

More C Interview Questions

What is difference between the following 2 lines…. int temp = (int)(0x00); int temp = (0x00int);

3 Answers   Bosch,


what is stack , heap ,code segment,and data segment

0 Answers  


What is cohesion and coupling in c?

0 Answers  


what is the output of the program?? #include<stdio.h> main ( ) { int a=010,sum=0,tracker: for(tracker=0;tracker<=a;tracker++) sum+=tracker; printf(“ %d\n”,sum); } what is the difference between a=10 and a=010??

3 Answers   Oracle,


1 232 34543 4567654 can anyone tell me how to slove this c question

6 Answers  


Explain what is the purpose of "extern" keyword in a function declaration?

0 Answers  


Total of how many functions are available in c?

3 Answers  


WAP to accept first name,middle name & last name of a student display its initials?

5 Answers   AITH, NIIT,


Write a C program to check a number even or odd, without using any relational, arithmetic operator and any loops.

1 Answers  


What is the advantage of c?

0 Answers  


Can we initialize extern variable in c?

0 Answers  


Is struct oop?

0 Answers  


Categories