C++ Programming

Last Modified: 1/18/2025

Ⅰ C++ Fundamentals

1 C & C++ Introduction

  1. C/C++ is a compiled language.

  2. C/C++ compilers map C/C++ programs into architecture-specific machine code (string of 0s and 1s).

    • Unlike Java, which converts to architecture-independent bytecode (run by JVM => Java Virtual Machine).
    • Unlike Python, which directly interprets the code.
    • Main difference is when your program is mapped to low-level machine instructions, CPU will directly interprets and runs.

Compilation Advantages

Compilation Disadvantages

Compile & Run

Normal C/C++ Compile & Run:

$ g++ -o hello hello.cpp