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
What is the difference between malloc() and calloc()?
Can you write the function prototype, definition and mention the other requirements.
Explain how can I remove the trailing spaces from a string?
What is dynamic dispatch in c++?
Explain how does flowchart help in writing a program?
Write a program to swap two numbers without using third variable in c?
What does c mean?
What is string in c language?
What is the difference between array and pointer?
Do variables need to be initialized?
When is a null pointer used?
What are multibyte characters?
Difference between pass by reference and pass by value?
What is the best way of making my program efficient?
What is calloc()?