The ------------- Statement lets the value of a variable or expression determine where the program will branch to
a) Do/while
b) Switch
c)If
d) Branch
Solution: The answer is B.
The switch statement lets the value of a variable or expression determine where the program will branch.
Explanation:
(a)The do/while statement tests the loop-continuation condition after the loop body executes.
(b)The switch statement lets the value of a variable or expression determine where the program will branch to.
●Used to select among statements from several alternatives
●In some cases, can be used instead of if/else if statements
(c)The if statement allows your program to branch into one of several possible paths. It performs a series of tests (usually relational) and branches when one of these tests is true.
(d) A branch occurs when one part of a program causes another part to execute.
So , it is clear from above explanation that switch statement lets the value of a variable or expression determine where the program will branch to.
Get Answers For Free
Most questions answered within 1 hours.