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 the difference between declaring a variable by constant keyword and #define ing that variable?

3379


Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

1223


How will you find a duplicate number in a array without negating the nos ?

2135


What is pointer to pointer in c?

1116


In which layer of the network datastructure format change is done

1891


What is the purpose of realloc()?

1148


An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above

1219


What should malloc() do? Return a null pointer or a pointer to 0 bytes?

1081


What are the different file extensions involved when programming in C?

1288


a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f

2158


any "C" function by default returns an a) int value b) float value c) char value d) a & b

1087


What is the explanation for modular programming?

1217


Does c have circular shift operators?

1247


What is a list in c?

1034


What is string in c language?

1162