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

What are the types of functions in c?

990


Multiply an Integer Number by 2 Without Using Multiplication Operator

769


Define the scope of static variables.

1134


Explain the advantages of using macro in c language?

1004


How to explain the final year project as a fresher please answer with sample project

977


Difference between macros and inline functions? Can a function be forced as inline?

1278


What is structure and union in c?

1154


When should a type cast not be used?

1068


What is || operator and how does it function in a program?

1095


A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(

2257


Explain how can I manipulate strings of multibyte characters?

1208


which is an algorithm for sorting in a growing Lexicographic order

1810


Explain that why C is procedural?

1147


What are keywords in c with examples?

1089


What is a program flowchart and how does it help in writing a program?

1144