This built in C++ data type can hold the values true and false.
Bool
This term describes the grouping of one or more statements between curly braces { }
What is a block statement?
This statement is used to jump to the end of a switch structure and skip all remaining branches.
break
This is the index number of the very first character in any C++ string
0
This specific library header must be included to use the rand() and srand() functions
<cstdlib>
This C++ operator is used specifically for equality testing, not for assignment.
==
This practice makes code easier for humans to read and understand, though the computer ignores it
Indentation
Unlike an if statement, the expression used in a switch statement must be of this general type
An integral type (i.e. int)
This operator is used to perform "concatenation," which joins two strings together
+
To ensure "really random" numbers on every program run, programmers often seed the generator with this.
The current time system, i.e. time(0);
This logical operator returns true only if both of its operands are true.
&&
An if statement placed inside the block of another if statement is known as this
What is a nested if statement?
This optional branch is executed only if no matching case is found in the switch structure
What is the default case?
This string member function returns the number of characters currently in a string.
What is length()?
The rand() function yields a random integer between 0 and this implementation-dependent constant
what is RAND_MAX?
In C++, a condition is represented by a logical expression. According to DeMorgan's Law, the expression !(A && B) can be rewritten as this logically equivalent statement
What is !A || !B?
Proper indentation is crucial for human readers, but the computer ignores it. If a programmer accidentally places a semicolon immediately after the condition, for example, if (x < y); the compiler will interpret that semicolon as this.
True or False: C++ switch statements allow you to check for a range of values, such as case 90-100:
False
Strings are compared using this type of ordering, which is similar to "dictionary order"
What is lexicographical order?
Random numbers generated by a computer are often called this because they eventually repeat
Psuedorandom numbers
This logical operator returns the negation of its operand.
! or NOT
In an if-else statement, this block specifies the actions to take when the condition is false.
The else block
his is the term for the constant expression attached to a branch in a switch statement
What is a label?
This member function takes two parameters (start and length) to extract a portion of a string
substr()
This is the formula (using a as the start and b as the end) to obtain a random value in a specific range
rand() % (b - a + 1) + a