ENES

C and C++

Two old, fast languages that sit underneath operating systems, browsers and games.

Operating system kernels, browsers and game engines stacked on a C and C++ layer that sits right on top of memory and hardware

C is a programming language created by Dennis Ritchie at Bell Labs in the early 1970s to write the Unix operating system. C++ came next: Bjarne Stroustrup started it in 1979 as "C with Classes", adding object-oriented programming and many other features on top of C. They are different languages, but C++ can use C code directly, so they are often named together.

Both are compiled straight to machine code and give the programmer direct control over memory: you ask for a piece of memory, you use it, you hand it back. That control is why they are fast and why they run where little else fits, from microcontrollers to the Linux kernel. The cores of Windows, macOS and Linux, browsers like Chrome and Firefox, many databases and most big game engines are written largely in C or C++.

The price of that control is risk. Forget to hand memory back, or read past the end of a list, and the program can crash or, worse, open a security hole. A large share of serious security bugs in big C and C++ projects come from exactly those mistakes, which is why newer languages like Rust aim for the same speed with memory safety built in. Still, decades of working code mean C and C++ are not going anywhere.

Keep in mind

Go deeper

Related terms

More in Software