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

helllo sir give me some information of the basic information the c as printf ,scanf , %d ,%f and why is the main use of these.

3 Answers  


What are the back slash character constants or escape sequence charactersavailable in c?

0 Answers  


The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration

0 Answers  


Which is better between malloc and calloc?

0 Answers  


what is purpose of fflush(stdin) function

4 Answers  


What are the keywords in c?

0 Answers  


What do you mean by a local block?

0 Answers   InterGraph,


create a C program that displays one z,two y's,three x's until twenty six A's. plzz answer i need it tomorrow.

4 Answers  


What is bin sh c?

0 Answers  


What is hashing in c?

0 Answers  


Print the foll in C...eg when n=5 the o/p must b + + + + + + + + + + + + + + + + +

1 Answers  


What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?

0 Answers  


Categories