This lesson includes an expert video walkthrough — purchase once for a full year of unlimited replays to master every key point 🎬
Programming Languages
Knowledge Summary
Categories of Programming Languages
- Machine language: consists of 0s and 1s; directly executed by the computer, but hard to read
- Assembly language: uses mnemonics instead of machine code and requires an assembler for translation
- High-level language: closer to natural language and requires a compiler or interpreter
- Compiled languages: C, C++ (source code -> executable file -> run)
- Interpreted languages: Python, JavaScript (executed line by line)
The Compilation Process of a Program
Source code -> Preprocessing -> Compilation -> Assembly -> Linking -> Executable file
- Preprocessing: handles preprocessing directives such as
#includeand#define - Compilation: translates C++ code into assembly code
- Assembly: translates assembly code into object files (machine code)
- Linking: links object files with libraries to generate the executable
Key Points of Basic C++ Syntax
- Variables and data types:
int,long long,double,char,bool - Operator precedence
- Control structures:
if-else,for,while,switch - Arrays and strings
- Function definition and function calls
- Basics of pointers
Frequently Tested C++ Knowledge
- Number of bytes occupied by each type with
sizeof - Integer overflow ranges
- Floating-point precision issues
- Bitwise operations:
&,|,^,~,<<,>>