1/39
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Relational operators allow you to ____Numbers
Compare
All relational operators are binary
True
Th_____ statement causes other programs statements to execute only under certain
If
To check if a variable has a particular value is the = relational operator, as in the statement if(s=3) count« “s has the vale 3”;
False
A pair of characters or a pair of string objects can be compared with any of the relational
True
In C + +1 relational expression is false it has the value
0
A(n)____is a variable usually a book, that signals a condition exists
Flag
The____statement executes one block of statements if a test condition is true and another block of condition false
If/else
A trailing else places at end of if/else if statement provides a default action when____ of the if conditions is/ are true
None
When is statmentbis placed within the conditionally executed code of another if statement this is known as
Nested if
The rule of matching an else with an if is that an else goes with the last if statement before it that doesn’t have its own else
True
The c++____operator represents logical AND
&&
If the sub expression on the left side oven || operator is true, then right expression not checked
True
Logical operators and and or have higher precedence that not operator
False
The ___ operator takes an operant and reversers it’s truth or falsehod
!=
The following test checks if variable child is in range of 3 to 12
If(child >=3 | | child<= 12)
False
Assuming gooddata is Boolean variable the following two tests are logical equivalent
If (good date==false)
If (!goodData)
True
Pass = (score >=7) ? Does same as
If (score >= 7)
Pass= true
Else
Pass= false
True
If switch statements has no ____ statement the program falls through all statement below one with matching case expression
Break
What declares an enumerates data type named student
Emil student { bill, Tom, Mary};
The expression x< y is a ____ expression
Relational
Operator to test equality
==
Relational expressions and logical expressions are both Boolean which means they evaluate to true or false
True
Relational operators connect two or more relational expressions into one or reverse the logic
False
What statement executes one statement or block of statements of condition is true and skips if if false
If
Acts like chain of if statements
If/ else If
Expression statement that evaluates to 5,-5 or anything other that 0 is considered true
True
Follow statements will not print anything
X=5
If (x<5)
Hey out hello world
False
Flag is variable of satay type
Bool
Let’s user know of invalid menu chooce
Input validation
S1==s2 when
None each case one or more
Logical or
| |
Checks child is 3-13
If (child>= 3 && <= 12)
False
If sub expression on left side of. && operator is true then the. That on right will not be checked
False
!(6>7 | | 3==4)
True
Equivalent?
If(moredate ==true)
If (moredata)
True
Switch statement branches to particular block of code depending on value if numeric
False
D we quit section of switch statement performs a similar task as
Else if
Scope of variable is program it is defined in
False
C= 17 and answer = 20
Answer = x> 100? 0:1
Assign 1 to answer