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's a good way to check for "close enough" floating-point equality?
How can I generate floating-point random numbers?
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
List the difference between a While & Do While loops?
What is line in c preprocessor?
What is the difference between malloc calloc and realloc in c?
What is the use of header?
How can you tell whether a program was compiled using c versus c++?
Tell us two differences between new () and malloc ()?
What is an array in c?
Write a program to print factorial of given number using recursion?
Difference between strcpy() and memcpy() function?
What are the benefits of c language?
How do you define a string?
What do you mean by c what are the main characteristics of c language?