Random Functions Selection Structure Comparison Operators Logical Operator
Functions– 10 Points QUESTION: When using the toupper() function in a comparison, you should be sure that everything you are comparing is lowercase. ANSWER: False
Functions– 20 Points QUESTION: The transform() function converts each of the characters contained in the range specified in the function’s first two arguments, beginning with the character whose location is specified in the first argument and continuing up to, but not including, the character whose location is specified in the second argument. ANSWER: True
Functions– 30 Points QUESTION: In C++, you can use the ____ function to convert a character to uppercase. ANSWER: toupper( )
Functions– 40 Points QUESTION: In C++, you can use the ____ function to convert a character to lowercase. ANSWER: tolower( )
Functions– 50 Points QUESTION: In C++ you can use the ____ function to convert a string to either uppercase or lowercase. ANSWER: transform( )
Selection Structure– 10 Points QUESTION: You use the selection structure when you want a program to make a decision or comparison and then select one of two paths, depending on the result of that decision or comparison. ANSWER: true
Selection Structure– 20 Points QUESTION: The condition in the selection structure specifies the decision you are making and is phrased so that it results in either a true or false answer only. ANSWER: true
Selection Structure– 30 Points QUESTION: The selection structure is also called the ____ structure. ANSWER: decision
Selection Structure– 40 Points QUESTION: The selection structure is one of the ____ programming structures you can use in a program. ANSWER: Three
Selection Structure– 50 Points QUESTION: The instructions following the condition of a selection structure are referred to as the ____ path. ANSWER: True
Comparison Operator– 10 Points QUESTION: Comparison operators are evaluated before any arithmetic operators in an expression. ANSWER: false
Comparison Operator– 20 Points QUESTION: In C++, comparisons with a precedence number of 2 are performed before comparisons with a precedence number of 1. ANSWER: false
Comparison Operator– 30 Points QUESTION: Comparison operators are often referred to as ____ operators. ANSWER: relational
Comparison Operator– 40 Points QUESTION: You use ____ to test for equality in C++. ANSWER: = =
Comparison Operator– 50 Points QUESTION: How many comparison operations are there? ANSWER: 6
Logical Operators– 10 Points QUESTION: The And and Or logical operators are evaluated before any arithmetic operators or comparison operators in an expression. ANSWER: false
Logical Operators– 20 Points QUESTION: Truth tables summarize how the computer evaluates the logical operators in an expression. ANSWER: True
Logical Operators– 30 Points QUESTION: Logical operators are sometimes referred to as ____ operators. ANSWER: Boolean
Logical Operators– 40 Points QUESTION: When the ____ logical operator is used to create a compound condition, all of the conditions must be true for the compound condition to be true. ANSWER: And
Logical Operators– 50 Points QUESTION: When the ____ logical operator is used, only one of the conditions must be true for the compound condition to be true. ANSWER: Or
Random– 10 Points QUESTION: If age is 60, the condition age 55 evaluates to false. ANSWER: false
Random– 20 Points QUESTION: Character literal constants are enclosed in double quotation marks. ANSWER: false
Random– 30 Points QUESTION: 5 – 2 > evaluates to ____. ANSWER: false
Random– 40 Points QUESTION: Most programming languages offer three forms of the selection structure: if, if/else, and ____. ANSWER: switch
Random– 50 Points QUESTION: You need to enter the ____ directive in any program that uses the transform() function. ANSWER: #include