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 / aswini

as there is no semicolon,uit will execute all the case
statements and j will be assigned as 500.
hence it will print 500..

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

find out largest elemant of diagonalmatrix

2247


What do you mean by dynamic memory allocation in c?

1101


How will you declare an array of three function pointers where each function receives two ints and returns a float?

1362


Why C language is a procedural language?

1024


What is a built-in function in C?

1597


how can f be used for both float and double arguments in printf? Are not they different types?

1068


how to find binary of number?

4449


Is c procedural or object oriented?

1006


Write a program to swap two numbers without using the third variable?

1066


What is the explanation for modular programming?

1208


how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....

1792


What is malloc return c?

1021


Differentiate abs() function from fabs() function.

1011


Differentiate Source Codes from Object Codes

1567


Explain 'bit masking'?

1086