1/37
Flashcards for C++ How to Program covering basic programming concepts, syntax, data structures, and object-oriented programming principles.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Hardware
Physical components of a computer system.
Software
Programs that run on a computer system.
Moore's Law
Hardware capacity doubles roughly every 2 years.
Data Hierarchy
The organization of data from smallest to largest units: Bits < Characters < Fields < Records < Files < Databases.
Programming Languages
Programming languages such as Machine, Assembly, and High-Level. C++ is a high-level language supporting object-oriented programming.
main()
The entry point of a C++ program.
//
Used for single-line comments in C++.
/* */
Used for multi-line comments in C++.
cout
Used for output in C++.
cin
Used for input in C++.
\n
Represents a newline character.
\t
Represents a tab character.
Algorithm
Step-by-step procedure for solving a problem.
Pseudocode
Simplified code-like language used for designing algorithms.
Control Structures
Sequence, selection (if
, if-else
, switch
), and iteration (while
, for
, do-while
).
Activity Diagrams
Show the flow of control in an algorithm.
Iteration
for
, while
, do-while
loops.
Logical Operators
&&
(AND), ||
(OR), !
(NOT)
break
& continue
Control loop execution.
switch
Statement
Multi-way branch statement.
Functions
Reusable blocks of code.
Prototypes
Declare function signature.
Overloading
Same function name, different parameters.
Recursion
Function calling itself.
Arrays
Fixed size, same data type.
Vectors
Dynamic size, safer alternative to arrays.
Pointers
Variables that store memory addresses.
& (address-of)
Returns the memory address of a variable.
Accesses the value stored at a memory address.
nullptr
Represents a null pointer in C++11+.
Class Interface
Public member functions of a class.
Implementation
Hidden implementation details of a class.
Constructor & Destructor
Used for object lifecycle management.
Encapsulation
Keeping data private within a class.
Base & Derived Classes
Code reuse through inheritance.
Inheritance Types
Public, Private, Protected
is-a vs has-a
Inheritance vs Composition.
Multiple Inheritance
Derived class inherits from multiple base classes.