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


Please Help Members By Posting Answers For Below Questions

How can you avoid including a header more than once?

568


What is a string?

670


The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration

636


How can I automatically locate a programs configuration files in the same directory as the executable?

634


In a header file whether functions are declared or defined?

632






How are structure passing and returning implemented?

594


Write a program to implement queue.

668


You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.

1785


In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping

983


What is bss in c?

609


What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25

1494


Explain what is the heap?

626


What is sizeof int in c?

606


What is pass by value in c?

600


How does sizeof know array size?

634