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...

consider the following program sigment
int n,sum=1;
switch(n) {
case 2:sum=sum+2;
case 3:sum*=2;
break;
default:sum=0;}
if n=2, what is the value of sum
a.0
b.6
c.3
d.none

Answer Posted / roopa

The anser is d i.e. NONE.
Case 2 does not have the break statement.
so sum becomes 8

Is This Answer Correct ?    2 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix

1954


What is difference between Structure and Unions?

1189


What are examples of structures?

1030


What is bss in c?

1048


What will the preprocessor do for a program?

1021


What are pointers? Why are they used?

1116


What is volatile variable in c with example?

1000


Write a program to check prime number in c programming?

1031


What is the use of c language in real life?

975


What are the Advantages of using macro

1118


What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?

1386


How will you divide two numbers in a MACRO?

1084


How a string is stored in c?

1019


Are the outer parentheses in return statements really optional?

1054


If the size of int data type is two bytes, what is the range of signed int data type?

977