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


Please Help Members By Posting Answers For Below Questions

What is the purpose of macro in C language?

845


How many types of functions are there in c?

779


how do you programme Carrier Sense Multiple Access

1708


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

2780


I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.

2087


Explain built-in function?

803


What is return in c programming?

701


What is auto keyword in c?

950


The difference between printf and fprintf is ?

936


What is the difference between new and malloc functions?

793


The file stdio.h, what does it contain?

861


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"

1805


what type of questions arrive in interview over c programming?

1757


What is difference between Structure and Unions?

857


How many levels deep can include files be nested?

852