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);

}

Answer Posted / prashanth

the answer is 500 as break is not mentioned it goes to case
5 from case4 so value of j=500

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I generate floating-point random numbers?

1048


How can I find out how much free space is available on disk?

1015


why return type of main is not necessary in linux

2046


What oops means?

935


.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }

1230


Why is c so powerful?

1067


How reliable are floating-point comparisons?

1040


What is the use of getch ()?

1039


How can I write a function that takes a format string and a variable number of arguments?

1005


Why is void main used?

1036


Is register a keyword in c?

996


Why doesnt the call scanf work?

1140


What is the use of ?

995


Explain how does flowchart help in writing a program?

1064


What is hashing in c language?

1191