CS 159 Lab 7 True or False
Each switch case label is the keyword case followed by a constant expression inside of single quotes.
F
It is a logical error to associate two switch case labels with a common set of actions.
F
The dangling else logical error can be corrected by indenting the if and else the same number of spaces.
F
An iteration is one execution of all statements found inside of a loop.
T
Associated with a case label is zero or more executable statements.
T
Each switch case label is the keyword case followed by a constant expression with a character inside of single quotes or an integer in no quotes.
T
In a post-test loop the minimum number of times that the statements found inside of the loop are executed is one.
T
In a pretest loop the control expression is evaluated before each iteration, including the first iteration.
T
In an else-if the if condition is evaluated first and additional else-if conditions are evaluated until a condition is found to be true.
T
It is not a logical error to associate two switch case labels with a common set of actions.
T
Multiway selection chooses among several alternatives.
T
No two switch case labels can represent the same constant expression value.
T
Only the statements associated with the first true condition are executed in a multiway else-if construct.
T
The action that is responsible for changing the result of the loop control expression from true to false is the loop update.
T
The break statement results in the control of the program exiting the switch statement.
T
The case label represents an integral type value that is a possible result of the control expression.
T
The condition that determines whether iteration is to continue in a loop is known as the loop control expression.
T
The conditional expression has three operands and two operators.
T
The contents of a loop have been identified to be repeated in a program.
T
The control expression that follows the keyword switch may be an integer or character expression.
T
The course standards limit the use of the break statement to only switch statements.
T
The dangling else logical error can be corrected by using { } in the if and else construct.
T
The else does not have a condition associated with it.
T
The else is executed only when all previously evaluated conditions are false.
T
The maximum number of actions that can be associated with a switch case label is one.
T
The switch construct can only be used when the selection condition reduces to an integer expression.
T
The work done in preparation for a loop is known as loop initialization.
T
When different variables are being evaluated as expressions it is better to use a nested if...else rather than the multiway else-if.
T
When the selection is based on a range of values, or the condition is not integral, we use the else-if for our multiway selection needs.
T
When the statements associated with one case have been executed the program flow continues with the statements for the next case.
T