1/25
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Directives
special commands that instruct the preprocessor to manipulate or prepare the source code before actual compilation begins.
comments
explanatory notes or hints written inside source code
single-line comment
Uses //
multi-line comment
Starts with /* and ends with */
global variable
variable declared outside of any function
function declaration
tells the compiler about a function before the function is actually defined.
main() function
entry point or starting point of a C++ program
function definition
contains the actual implementation or logic of a function.
variable
named placeholder/storage location that can store and manipulate a value
Variable Initialization
giving a variable its initial value
Rule 1
Must begin with a letter or underscore
Rule 2
Can contain letters, numbers, and underscores
Rule 3
No spaces
Rule 4
No special characters
Rule 5
Cannot use C++ reserved keywords
Rule 6
C++ is case-sensitive
Rule 7
Use meaningful names
Data Type
integers
whole numbers
char
Individual/single character
std::cout
used to display/output information on the screen
using namespace std;
to remove the “std” in std::cout
endl
moves the output to the next line
\n
replacing the 'endl'
constant
value that cannot be changed after it has been initialized