Please enable JavaScript.
Coggle requires JavaScript to display documents.
C++ - Coggle Diagram
C++
Statements
- Definition: Independent units of code in C++ analogous to sentences in human language.
- Terminator: Ended with a semicolon (
;).
- Declaration Statement: Declares variables (e.g.,
int x;).
- Assignment Statement: Assigns a value to a variable (e.g.,
x = 5;).
- Output Statement: Outputs data to the screen (e.g.,
cout << x;).
Key Concepts
- Preprocessor Directives: Instructions to the compiler (e.g.,
#include <iostream>).
- Namespace: A compartment (e.g.,
std) where specific functionality resides.
- Return Values: Indicate program success (
0) or failure (non-zero values).
Expressions
- Definition: A mathematical or logical entity that evaluates to a value.
-
-
-
- Functions: e.g.,
(y - 3).
-
Functions
- Definition: A collection of statements executed sequentially.
-
main(): Mandatory in every C++ program. Execution starts here.
- Purpose: Designed to perform specific tasks (e.g.,
CalculateGrade()).
- Definition: Groups of reusable functions.
- C++ Standard Libraries: Provide additional functionality, e.g.,
iostream for input/output.
- Linking: During compilation, libraries are linked to the program.