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 / vinod
int 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);
}
}
For the above program the output would be 16 and 21
| Is This Answer Correct ? | 36 Yes | 6 No |
Post New Answer View All Answers
What is the difference between procedural and declarative language?
What is new line escape sequence?
Explain bitwise shift operators?
Difference between exit() and _exit() function?
Write a program to check palindrome number in c programming?
Dont ansi function prototypes render lint obsolete?
Why do we use return in c?
What is the default value of local and global variables in c?
Under what circumstances does a name clash occur?
What is variable in c example?
How can I automatically locate a programs configuration files in the same directory as the executable?
in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.
Why c is known as a mother language?
Define the scope of static variables.
What is a floating point in c?