C is a procedural systems language created in the 1970s. It still powers Linux kernels, SQLite, Redis, Python and Ruby interpreters, and countless embedded devices.
Core characteristics
- Compiled to native code — no VM; the CPU runs your instructions directly
- Manual memory model — stack variables auto-expire; heap blocks need
malloc/free - Minimal runtime — small libc; no built-in classes or exceptions
- Portability — source can compile on many platforms with a standards-conforming compiler
Typical build-run flow (local)
- Write
main.cwithint main(void) gcc -std=c11 -Wall -o main main.c./mainruns the native binary
Important interview questions and answers
- Q: Is C garbage collected?
A: No—stack memory ends at scope; heap memory must be freed explicitly (or managed by conventions in higher-level wrappers). - Q: Why learn C today?
A: It explains how machines and OSes work; many languages and tools are built on C ABIs and libc. - Q: C vs C++?
A: C is a smaller procedural language; C++ adds OOP, templates, and a much larger feature set on top of a C-compatible subset.
Self-check
- What file extension do C source files typically use?
- Name one widely used project written in C.
Interview prep
- Is C garbage collected?
No—stack variables end at scope; heap blocks from
mallocmust be freed withfree. There is no tracing GC in standard C.- Who still uses C?
Linux kernel, SQLite, Redis, Python interpreter, embedded firmware vendors, and countless libraries exposing a stable C ABI.