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 / mayank sharma

when the control will encounter break statement.it will move
outside the loop. which will not pass through printf();and
also braces are not properly put

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

‎How to define structures? · ‎

636


provide an example of the Group by clause, when would you use this clause

1711


What does 2n 4c mean?

725


What is stack in c?

619


What is the best organizational structure?

644






What is wild pointer in c?

613


Write a code to generate divisors of an integer?

645


How do you define CONSTANT in C?

655


What does typedef struct mean?

664


Why calloc is better than malloc?

574


Under what circumstances does a name clash occur?

694


Explain what is meant by high-order and low-order bytes?

637


What is 1d array in c?

602


How many data structures are there in c?

620


What is c variable?

556