C++ is a multi-paradigm systems language created by Bjarne Stroustrup as "C with Classes." It remains one of the most widely used languages for performance-critical software.
Core characteristics
- Compiled to native code — no VM; direct CPU execution like C
- Zero-cost abstractions — templates and inline functions aim to compile away overhead
- Rich standard library (STL) — containers, algorithms, strings, I/O streams
- Backward compatible with C — most C code compiles as C++ with adjustments
Typical build-run flow (local)
- Write
main.cppwithint main() g++ -std=c++17 -Wall -o main main.cpp./mainruns the native binary
Where C++ appears
Chromium, Unreal Engine, LLVM, MySQL, high-frequency trading stacks, and countless game and graphics engines rely on C++ for predictable latency and hardware access.
Important interview questions and answers
- Q: C vs C++ in one line?
A: C is procedural with a minimal runtime; C++ adds OOP, templates, exceptions, and a much larger standard library on a C-compatible foundation. - Q: Who still uses C++?
A: Game engines, browsers, databases, finance, embedded systems with modern toolchains, and teams maintaining large native codebases.
Self-check
- What file extension do C++ source files typically use?
- Name one major project written in C++.
Tip: C++ source often uses .cpp or .cc; headers use .h or .hpp.
Interview prep
- Is C++ garbage collected?
No by default—use stack objects, RAII, and smart pointers; the standard library does not provide a tracing GC.
- Who still uses C++?
Chromium, Unreal Engine, game studios, databases, finance, and teams maintaining large performance-critical native systems.