Presentation is loading. Please wait.

Presentation is loading. Please wait.

Random Functions Selection Structure Comparison Operators Logical Operator 10 20 30 40 50 40 30 20 10 50 40 30 20 10 50 40 30 20 10 50 40 30 20 10.

Similar presentations


Presentation on theme: "Random Functions Selection Structure Comparison Operators Logical Operator 10 20 30 40 50 40 30 20 10 50 40 30 20 10 50 40 30 20 10 50 40 30 20 10."— Presentation transcript:

1

2 Random Functions Selection Structure Comparison Operators Logical Operator 10 20 30 40 50 40 30 20 10 50 40 30 20 10 50 40 30 20 10 50 40 30 20 10

3 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

4 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

5 Functions– 30 Points QUESTION: In C++, you can use the ____ function to convert a character to uppercase. ANSWER: toupper( )

6 Functions– 40 Points QUESTION: In C++, you can use the ____ function to convert a character to lowercase. ANSWER: tolower( )

7 Functions– 50 Points QUESTION: In C++ you can use the ____ function to convert a string to either uppercase or lowercase. ANSWER: transform( )

8 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

9 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

10 Selection Structure– 30 Points QUESTION: The selection structure is also called the ____ structure. ANSWER: decision

11 Selection Structure– 40 Points QUESTION: The selection structure is one of the ____ programming structures you can use in a program. ANSWER: Three

12 Selection Structure– 50 Points QUESTION: The instructions following the condition of a selection structure are referred to as the ____ path. ANSWER: True

13 Comparison Operator– 10 Points QUESTION: Comparison operators are evaluated before any arithmetic operators in an expression. ANSWER: false

14 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

15 Comparison Operator– 30 Points QUESTION: Comparison operators are often referred to as ____ operators. ANSWER: relational

16 Comparison Operator– 40 Points QUESTION: You use ____ to test for equality in C++. ANSWER: = =

17 Comparison Operator– 50 Points QUESTION: How many comparison operations are there? ANSWER: 6

18 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

19 Logical Operators– 20 Points QUESTION: Truth tables summarize how the computer evaluates the logical operators in an expression. ANSWER: True

20 Logical Operators– 30 Points QUESTION: Logical operators are sometimes referred to as ____ operators. ANSWER: Boolean

21 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

22 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

23 Random– 10 Points QUESTION: If age is 60, the condition age 55 evaluates to false. ANSWER: false

24 Random– 20 Points QUESTION: Character literal constants are enclosed in double quotation marks. ANSWER: false

25 Random– 30 Points QUESTION: 5 – 2 > 1 + 2 evaluates to ____. ANSWER: false

26 Random– 40 Points QUESTION: Most programming languages offer three forms of the selection structure: if, if/else, and ____. ANSWER: switch

27 Random– 50 Points QUESTION: You need to enter the ____ directive in any program that uses the transform() function. ANSWER: #include


Download ppt "Random Functions Selection Structure Comparison Operators Logical Operator 10 20 30 40 50 40 30 20 10 50 40 30 20 10 50 40 30 20 10 50 40 30 20 10."

Similar presentations


Ads by Google