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 / deepa
syntax error every case statement requires a break statement
| Is This Answer Correct ? | 7 Yes | 32 No |
Post New Answer View All Answers
What is the benefit of using #define to declare a constant?
Why shouldn’t I start variable names with underscores?
How would you obtain the current time and difference between two times?
how can f be used for both float and double arguments in printf? Are not they different types?
Explain the properties of union.
Describe the difference between = and == symbols in c programming?
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
What is d'n in c?
There seem to be a few missing operators ..
Explain what is #line used for?
How can I open files mentioned on the command line, and parse option flags?
I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...
Explain what is page thrashing?
Why doesnt long int work?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?