Exam 4: Selection
Exam 1: Introduction to Computer Programming44 Questions
Exam 2: Getting Started in C Programming46 Questions
Exam 3: Processing and Interactive Input48 Questions
Exam 4: Selection44 Questions
Exam 5: Repetition47 Questions
Exam 6: Modularity Using Functions: Part I51 Questions
Exam 7: Modularity Using Functions: Part II49 Questions
Exam 8: Arrays48 Questions
Exam 9: Character Strings51 Questions
Exam 10: Data Files50 Questions
Exam 11: Arrays, Addresses, and Pointers49 Questions
Exam 12: Structures48 Questions
Exam 13: Dynamic Data Structures49 Questions
Exam 14: Additional Capabilities55 Questions
Exam 15: A Brief Introduction to C++49 Questions
Select questions type
The evaluation feature for the && and || operators that makes the evaluation of an expression stop as soon as it is definitively determined that an expression is true or false is known as short-circuit evaluation.
Free
(True/False)
4.8/5
(38)
Correct Answer:
True
One of the main advantages of using a switch statement is that it avoids using the equality operator, ==.
Free
(True/False)
4.9/5
(34)
Correct Answer:
True
The switch statement usually results in more complex code than an equivalent if-else chain.
(True/False)
4.8/5
(36)
A relational expression consists of a boolean operator that compares two operands.
(True/False)
4.8/5
(28)
The term "flow of control" refers to the order in which a program's statements are executed.
(True/False)
4.9/5
(31)
A ____ statement is a specialized selection statement that can be used in place of an if-else chain where exact equality to one or more integer constants is required.
(Multiple Choice)
4.9/5
(38)
A common practice for some programmers is to place the opening brace of a compound statement on the same line as the if and else statements.
(True/False)
4.9/5
(35)
Including one or more if-else statements within an if or if-else statement is referred to as a ____ if statement.
(Multiple Choice)
4.7/5
(40)
Within a selection statement, an expression that evaluates to 0 or less is considered as false, while any positive is considered as true.
(True/False)
4.8/5
(28)
When an executing program encounters a(n) ____ statement, the condition is evaluated to determine its numerical value, which is then interpreted as either true or false.
(Multiple Choice)
4.8/5
(34)
The use of braces to enclose a set of individual statements creates a single block of statements, which may be used anywhere in a C program in place of a single statement.
(True/False)
4.8/5
(40)
It is a good practice to terminate the last case in a switch statement with a ____.
(Multiple Choice)
4.9/5
(29)
In C, relational expressions are evaluated to yield a boolean result.
(True/False)
4.8/5
(37)
When the ____ operator is used with two expressions, the resulting condition is true if either one or both of the two expressions are true.
(Multiple Choice)
4.8/5
(41)
Indentation used within an if-else is critical to ensure that the code compiles correctly.
(True/False)
4.8/5
(33)
Any number of case labels may be contained within a switch statement, in any order.
(True/False)
4.8/5
(43)
Showing 1 - 20 of 44
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)