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

Answer is e), since opening and closing flower braces do
not match in numbers and default do not have colon
following it. Assuming switch(i) has an opening flower
brace and default has colon after it "switch(i) {, ...
default: i+= 4;"answer would be d).
All cases will be fall-through including default:

Is This Answer Correct ?    27 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there any data type in c with variable size?

1036


console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above

1097


Explain how does flowchart help in writing a program?

1064


A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference

1046


What is pointer to pointer in c with example?

986


What does s c mean in text?

1057


write a program to create a sparse matrix using dynamic memory allocation.

4844


What is 02d in c?

1030


What is this infamous null pointer, anyway?

990


What does a function declared as pascal do differently?

1045


What do you mean by dynamic memory allocation in c? What functions are used?

1111


Explain bit masking in c?

1085


What is the advantage of c?

1048


What are the applications of c language?

1014


main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none

1304