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
Explain what math functions are available for integers? For floating point?
How do I use strcmp?
WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?
Why c is called object oriented language?
What are the different types of objects used in c?
What are the 3 types of structures?
Why clrscr is used after variable declaration?
Why do we use main function?
What does 3 periods mean in texting?
What is a MAC Address?
Are enumerations really portable?
What is spaghetti programming?
What is typedef example?
How many header files are in c?
What is a nested formula?