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

In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)

2121


Create a simple code fragment that will swap the values of two variables num1 and num2.

1285


Can you define which header file to include at compile time?

1022


Explain how do you convert strings to numbers in c?

1078


What is 02d in c?

1073


What is action and transformation in spark?

1160


Why string is used in c?

1005


What are the string functions? List some string functions available in c.

991


What does. int *x[](); means ?

1066


What are derived data types in c?

1085


What is strcpy() function?

1143


What is the right type to use for boolean values in c? Is there a standard type?

1009


What is c system32 taskhostw exe?

1024


Why is sizeof () an operator and not a function?

1030


How can you increase the size of a dynamically allocated array?

1187