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 / vijay r15

error
Becoz
j=0: j=400: // in these : should be replaced by ;
In case 3; // in this ; should be replaced by :

After correcting this the op is 500 becoz there is no break statement
Ans 500

Dbtfull guys mail to raj.vijay55@gmail.com

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a void * in c?

1089


What happens if you free a pointer twice?

1101


Is javascript written in c?

1079


What is the difference between declaring a variable by constant keyword and #define ing that variable?

3394


ATM machine and railway reservation class/object diagram

5264


What is pointer & why it is used?

1135


What is volatile variable in c?

1106


What is the use of typedef in c?

1047


Why is c not oop?

992


Explain the use of fflush() function?

1098


write a program to print data of 5 five students with structures?

2060


how could explain about job profile

1937


What is variable and explain rules to declare variable in c?

1111


what does static variable mean?

1126


What are the features of the c language?

1103