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

What is volatile variable how do you declare it?

1189


Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?

3568


Are local variables initialized to zero by default in c?

1102


How do I swap bytes?

1123


Explain what are multidimensional arrays?

1125


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

1399


What are the 4 types of functions?

1113


#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }

1185


Which is the best website to learn c programming?

1137


What is the use of typedef in structure in c?

1009


what is the difference between 123 and 0123 in c?

1278


What is the condition that is applied with ?: Operator?

1186


What would be an example of a structure analogous to structure c?

1053


What is meant by initialization and how we initialize a variable?

1096


What is meant by 'bit masking'?

1440