Nearby lessons
4 of 124C - Features
The main features of the C language — simplicity, speed, portability, a rich set of operators, pointers for direct memory access, modularity, recursion, extensibility and a small but powerful standard library.
The Features at a Glance
| Feature | What it means for you |
|---|---|
| Simple | A small language with only 32 keywords (C89) and a clear structure |
| Fast & efficient | Compiles directly to machine code with almost no runtime overhead |
| Portable | The same source file compiles on Windows, Linux, macOS and microcontrollers |
| Rich operator set | Around 45 operators, including bitwise operators most languages lack |
| Pointers | Read and write memory addresses directly |
| Modular | Split a program into functions and files that can be reused |
| Extensible | Add your own functions and libraries; the language never gets in the way |
| Recursion | A function may call itself, which simplifies many algorithms |
| Structured | Blocks, loops and functions instead of goto spaghetti |
| Standard library | Ready-made functions for I/O, strings, maths, memory and files |
Simplicity — Only 32 Keywords
The entire C89 language is built from just 32 reserved words. Compare that with well over 50 in Java and around 100 in C#. A small vocabulary means there is very little to memorise before you can read any C program.
Speed — Straight to Machine Code
There is no virtual machine and no interpreter between your code and the CPU. When you write a + b, the compiler emits a single addition instruction. Nothing is checked, boxed or garbage-collected at runtime.
Portability — Compile Anywhere
C source code is not tied to one processor. Give the same .c file to a compiler on Windows, on a Linux server, or on an Arduino, and each one produces a working program for its own hardware.
Pointers — Direct Memory Access
Very few modern languages let you look at a variable's actual address. C does, and that is what makes it suitable for writing operating systems and device drivers:
The Honest Limitations
C's power comes from what it leaves out, and that cuts both ways:
- No automatic memory management — memory you allocate, you must free.
- No array bounds checking — writing past the end of an array corrupts memory silently.
- No exception handling — errors are reported with return values you must check.
- No object-oriented features — no classes or inheritance (that is C++).
- No built-in string type — strings are just arrays of
char.
- C is simple: only 32 keywords in C89.
- It is fast because it compiles straight to machine code.
- It is portable: the same source compiles on many machines.
- Pointers give direct access to memory addresses.
- It is modular and extensible — build big programs from small functions.
- C gives you no garbage collector and no bounds checking; that is your job.