1/18
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What is a Data Structure?
specialized container that organizes info so it’s efficient. includes element types, set of rules, and operations
What are the requirements for a good algorithm?
correct (stops, gives right answer) and efficient (fast and low memory usage)
What is the difference between i++ and ++i?
uses the value then increments; increments then uses it.
What does the bitwise AND (&) operator do?
compares each bit of two var; returns 1 if both are 1.
What is the purpose of the void data type?
used for functions that do not return a value
How do you declare a constant in C++?
using the const keyword to make a var read-only
What is the ternary operator shorthand (?:) for?
if-else statement; int v = (x < y ? x : y) ;
What is the difference between break and continue?
break exits the loop; continue skips current iteration, moves to the next.
What is Operator Overloading?
Defining standard operators (like ==, +, =) for user-defined types like classes or structures
Static vs. Dynamic Arrays
fixed size set at compile ; use pointers and new operator for runtime sizing.
How do you create and write to a file in C++?
ofstream class from library (insertion operator (<<))
What is a Class Constructor?
A special method; same name as class; automatically called when object called, used to initialize attributes
What is Inheritance?
When a child class inherits attributes and methods from a parent.
Can a subclass access private members of its parent?
No, only public and protected members.
What is Function Overriding?
Redefining a parent class's method in a child class
switch statement
selects one of many code blocks based on a var's value
Do/ while loop
Executes code block at least once before checking the condition (repeat if true)
How to read from a file
ifstream; getline() fetch line from the file
copy constructor
class name, object ( object copied)