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 are global variables?
What is call by value in c?
What is the difference between procedural and functional programming?
Write a code on reverse string and its complexity.
When should we use pointers in a c program?
Explain how are portions of a program disabled in demo versions?
Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given
When should a far pointer be used?
List the different types of c tokens?
What is structure pointer in c?
Is a house a shell structure?
write a c program for swapping two strings using pointer
What is difference between static and global variable in c?
How can I automatically locate a programs configuration files in the same directory as the executable?
What is && in c programming?