What is the value of x if we have the expression: int x = 14 / 3
3
Which kind of loop is guaranteed to run at least once?
Do-While Loop
This keyword is used when a function returns nothing.
void
The index of the very first element in any array.
0
What is the name for this operator: (>>) used to read from a stream.
Extraction operator
In programming, this term describes a variable/value that never changes, like 3.14 or 'Hello'
Constant
The logical operator that represents "OR".
| |
A copy of an argument passed to a function.
pass-by-value
The property of arrays that means their size cannot change.
Static
This function is used to read an entire line, including spaces.
getline()
The result of 17 % 5
2
This statement is a cleaner alternative to many if-else blocks.
Switch Statement
The syntax used in a header to tell the compiler a function exists.
Function Prototype
To add an element to the end of a vector, use this function.
push_back()
This manipulator sets the number of decimal places shown.
setprecision(n)
This type is best for storing a single character like 'A'.
Char
What is the result of !(true && false)?
This symbol (&) denotes what kind of parameter?
Call-by-reference
When passing an array to a function, you must also pass this.
The size of the array
This function is used to reset a stream's fail state.
.clear()
The name for the region of code where a variable is accessible.
Scope
Given int i = 0; while (i < 5) { if (i % 2 == 0) continue; i++; }, what causes an infinite loop?
No i increment ever occurs
This happens to a variable if const is used with a reference.
It becomes read-only (cannot be changed)
This vector function returns the current number of elements.
This function "skips" characters remaining in the buffer.
ignore()