A loop that runs indefinitely because the condition never becomes false
What is an infinite loop
This data structure stores a collection of elements in a single line, with each element accessible by an index.
What is a 1D Array
What does a void function return in C++?
What is nothing
A C++ class used to open a file for reading input
What is ifstream
A C++ data structure used to group related variables of different types into a single unit
What is a struct?
A control structure in C++ that executes code repeatedly as long as a condition is true.
What is a while loop
The WHAT manipulator forces floating-point numbers to be displayed in fixed-point notation and sets their precision to a fixed value.
What is fixed manipulator
In the function declaration:
int calculate(int num)
This describes what the function will output or send back to the program after execution.
What is a return type
This class allows for both reading from and writing to files.
What is fstream
A block of code designed to perform a specific task
What is a function
This type of loop guarantees that its block of code will execute at least once, even if the condition is false on the first iteration.
do/while
A data structure used to store data in a tabular format, with rows and columns
What is a 2D array
This function reads an entire line of input from the user, including spaces, and stores it inside a variable.
What is getline() function
A function used in C++ to skip characters in an input buffer, often used to remove leftover newline characters after reading input
What is ignore()
This function adds an element to the end of a vector.
What is push_back()
A control structure used to perform an action based on multiple possible conditions, with each condition checked in a case
What is a switch statement
Added to an array index to match the number the user expects, since array indexing starts at 0.
What is 1
A value passed into a function to provide the data it needs to operate
What is an argument
The use of the " & " symbol in C++ to allow cin to directly change a variable's value, updating the original variable with user input.
What is passing by reference
What does a pointer store in C++?
What is a memory address
A data type commonly used in for loops to count elements in vectors or arrays and iterate through them, often in conjunction with the size() function
What is size_t
A dynamic array in C++ that can grow or shrink in size at runtime, providing automatic memory management and easy access to elements
What is a Vector
Variables, often called placeholders, in a function definition that allow values to be passed into the function for it to use during execution
What are parameters
The process of adding data to the end of an existing file without overwriting its current contents, typically done using ofstream with the ios::app flag
What is appending
A shorthand way to write an if-else statement in C++?
What is the ternary operator (? :)?