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

Result of the following program is
main()
{
int i=0;
for(i=0;i<20;i++)
{
switch(i)
case 0:i+=5;
case 1:i+=2;
case 5:i+=5;
default i+=4;
break;}
printf("%d,",i);
}
}
a)0,5,9,13,17
b)5,9,13,17
c)12,17,22
d)16,21
e)syntax error

Answer Posted / vinod

int main()
{
int i=0;
for(i=0;i<20;i++)
{
switch(i)
{
case 0: i+=5;
case 1: i+=2;
case 5: i+=5;
default: i+=4; break;
}
printf("%d,",i);
}
}

For the above program the output would be 16 and 21

Is This Answer Correct ?    36 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the scope of static variable in c?

1036


How many types of operator or there in c?

1111


When should you use a type cast?

1135


Why dont c comments nest?

1065


what are the different storage classes in c?

1191


What is the time and space complexities of merge sort and when is it preferred over quick sort?

1093


What is echo in c programming?

1042


Write a function that will take in a phone number and output all possible alphabetical combinations

1063


Write the control statements in C language

1229


how we can make 3d venturing graphics on outer interface

4846


Why isnt there a numbered, multi-level break statement to break out

1065


If I have a char * variable pointing to the name of a function ..

1186


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

1082


What is the difference between typedef and #define?

1075


What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers

1265