1/14
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Stages of C++
Preprocessing
Compilation
Assembly
Linking Execution
Preprocessing
Compilation
Assembly
Linking Execution
Stages of C++
Preprocessing
Handles all preprocessor directives (line starting with #, e.g., @#include, #define
Expands macros, removes comments, and includes header files
Output: a pure C++ source file (no directives, everything expanded)
Preprocessing
Output: a pure C++ source file (no directives, everything expanded)
Pure C++ Source File
Output of the Preprocessing Stage
Compilation
The ___ translates the preprocessed source code into assembly language (human readable low-level code specific to the CPU
Checks for syntax errors and converts high-level C++ constructs into lower level instructions
Output: Assembly Code
Compilation
Output: Assembly Code
Assembly Code
The output of the Compilation stage
Assembly
The ___ converts the ___ code into object code
e.g.) machine code, binary format, but not yet executable
This is stored in an object file (.o or .obj)
Contains: machine instructions, symbol table (function/variable references not yet linked
Assembly
Contains: machine instructions, symbol table (function/variable references not yet linked
Assembly
Converts ___ code to object code
Linking
The ___ combines object files and required libraries like <iostream>
Resolves external references like cout, cin, or functions defines in other files
Produces a final executable file (.exe, no extention, or .out)
Linking
Produces a final executable file (.exe, no extention, or .out)
Executable File
Output of the Linking Stage
Execution
The ___ file is loaded into memory by the operating system
The CPU executes the machine instructions
Program runs and produces output