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 |
simple program for virtual function?
write a Program to dispaly upto 100 prime numbers(without using Arrays,Pointer)
26 Answers ADITI, iFlex, Infosys, Oracle, TCS, Unicops, Wipro,
What is abstract data structure in c?
In a switch statement, explain what will happen if a break statement is omitted?
Are comments included during the compilation stage and placed in the EXE file as well?
Is main() is used in the program,,see below example? void main() { int i; for(i=0;i<10;i++) main(); } Then what is the output of the program?
why we shiuld use main keyword in C
Method Overloading exist in c ?
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
What are the storage classes in C?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
What is 02d in c?