Switch (i)
i=1;
case 1
i++;
case 2
++i;
break;
case 3
--i;
Output of i after executing the program
Answers were Sorted based on User's Feedback
WHAT IS THE VALUE OF I BEFORE ENTERING THE SWITCH CASE???
if the values is something other than 1 , 2 , 3 there wont
be any effect, ASSUMING u have forgotton to give the curly
braces.
otherwise,
you will get an error, if the curly braces are not there
for the switch case.
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / jack
the value of i that was initialized before the switch
statement remains unchanged as the switch statement does
not have flower braces.
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / vinay
the value of i if we forget the mistake u done
it is i=2;
| Is This Answer Correct ? | 1 Yes | 3 No |
Why is a semicolon (;) put at the end of every program statement?
in malloc and calloc which one is fast and why?
What is encapsulation?
How. To pass the entrance test
simple program of graphics and their output display
how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n");
How can I remove the leading spaces from a string?
Can include files be nested?
What is 1d array in c?
Find the O/p of the following struct node { char *name; int num; }; int main() { struct node s1={"Harry",1331}; struct node s2=s1; if(s1==s2) printf("Same"); else printf("Diff"); }
Define function ?Explain about arguments?
2 Answers Geometric Software, Infosys,
What is the purpose of scanf() and printf() functions?