How it works
C was created at Bell Labs in the early 1970s to write Unix, and it is still the language of operating system kernels (Linux, and much of Windows and macOS), embedded devices and core libraries such as SQLite and PostgreSQL. It is small, maps closely to what the hardware does, and leaves memory management to the programmer.
C++, started by Bjarne Stroustrup in 1979 and first released in 1985, adds classes, templates and a large standard library on top of C. It powers Chrome, Firefox and most game engines, including Unreal, as well as trading systems, databases and audio and video software. A new standard every three years keeps it evolving.
Both compile to very fast machine code, but neither stops a program from reading past the end of an array or using memory after it has been freed. Microsoft and Google have each reported that most of their serious security bugs are memory-safety mistakes of this kind, which is why more new systems code now starts in Rust.
C and C++ pros and cons
Pros
- Very high performance and direct control over memory and hardware
- Runs everywhere, from microcontrollers to supercomputers
- Decades of libraries, tools and existing code
- The native language of most operating systems and game engines
Cons
- Memory bugs lead to crashes and security holes
- C++ is large and complex, with many pitfalls
- No standard package manager, and build setups (CMake) can be fiddly
When to use C and C++
Pick it when
- Game engines, graphics and real-time audio or video
- Embedded devices and firmware
- Extending an existing C or C++ codebase or library
Skip it when
- New projects that could use Rust or Go for the same job with fewer risks
- Ordinary web apps and business software
C and C++ pricing
Open source
Free compilers: GCC and Clang are open source, and Microsoft's compiler comes with the free Visual Studio Community.
Approximate, checked September 2026.What the other tools cost
C and C++ vs the alternatives
Related terms
More in Programming languages
Systems