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
Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.
When should a type cast be used?
please send me the code for multiplying sparse matrix using c
Is this program statement valid? INT = 10.50;
Why do we use null pointer?
Tell me what are bitwise shift operators?
What is || operator and how does it function in a program?
Why doesnt this code work?
void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply
How are strings stored in c?
how to find anagram without using string functions using only loops in c programming
What’s a signal? Explain what do I use signals for?
What is a header file?
Explain Function Pointer?
What is ponter?