Switch (i)
i=1;
case 1
i++;
case 2
++i;
break;
case 3
--i;
Output of i after executing the program
Answer Posted / shruti
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 |
Post New Answer View All Answers
How variables are declared in c?
Explain #pragma statements.
code for find determinent of amatrix
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
define string ?
What is the benefit of using const for declaring constants?
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
What is volatile variable in c with example?
explain what are pointers?
What does the && operator do in a program code?
When should I declare a function?
What is the difference between a function and a method in c?
What do you mean by recursion in c?
Where we use clrscr in c?
Subtract Two Number Without Using Subtraction Operator