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

Answer is (e) Option : Syntax error

void main()
{
int i=0;
for(i=0;i<20;i++)
{
switch(i)
case 0:i+=5; // this is illegal
case 1:i+=2; // this is illegal
case 5:i+=5; // this is illegal
default i+=4; // Colon is missing
break;
}
printf("%d,",i);
}
} // This is extra braces

Is This Answer Correct ?    4 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me what is the purpose of 'register' keyword in c language?

1012


What is a stream?

1146


What is wrong in this statement?

1147


differentiate built-in functions and user – defined functions.

1092


Do pointers need to be initialized?

1087


PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE

2026


Explain how can I prevent another program from modifying part of a file that I am modifying?

1094


Explain what is wrong with this program statement?

1121


What is the best way to store flag values in a program?

1081


What is union and structure in c?

1231


What kind of structure is a house?

1048


Is c# a good language?

1015


Differentiate between ordinary variable and pointer in c.

1185


What are header files and what are its uses in C programming?

1242


Are there constructors in c?

1011