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 purpose of macro in C language?
How many types of functions are there in c?
how do you programme Carrier Sense Multiple Access
what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555
I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.
Explain built-in function?
What is return in c programming?
What is auto keyword in c?
The difference between printf and fprintf is ?
What is the difference between new and malloc functions?
The file stdio.h, what does it contain?
Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"
what type of questions arrive in interview over c programming?
What is difference between Structure and Unions?
How many levels deep can include files be nested?