C Programming - Control Instructions - Discussion
Discussion Forum : Control Instructions - Point Out Correct Statements (Q.No. 9)
9.
Which of the following sentences are correct about a switch loop in a C program?
1: | switch is useful when we wish to check the value of variable against a particular set of values. |
2: | switch is useful when we wish to check whether a value falls in different ranges. |
3: | Compiler implements a jump table for cases used in switch. |
4: | It is not necessary to use a break in every switch statement. |
Discussion:
17 comments Page 2 of 2.
Ravi said:
1 decade ago
It is not necessary to use a break in every switch statement.
We use break in case statement not in switch.
We use break in case statement not in switch.
Sachin Kumar said:
1 decade ago
But the question is that why the 2nd option is incorrect even we can use switch to find range?
(1)
Ramyaa said:
1 decade ago
Each and every case should have break condition. Whether it is mandatory?
Venkata said:
9 years ago
Can we wrote switch statement without cases? Please anyone tell me.
Vinoth said:
1 decade ago
Jump table means break statement is it correct or not.
Dilli babu.m said:
1 decade ago
What do you meant by jump table in your explanation?
Saurabh Pandey said:
1 decade ago
Why option 2 is not correct? explain.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers