C is an imperative compiled programming language. It’s an important starting language in computer engineering since:
- The language interacts so closely with hardware.
- It introduces concepts in the context of memory.
- It requires us to implement many functions by hand.
It lacks things like objects and classes, but it does introduce finer control of memory and hardware components. Not to be confused with C++ — which is not a superset of C but closely related.
C versions are expressed by the year of release. The most common versions are C89, C99, and C11. The two dominant C compilers are GCC and Clang.
Language features
Basics
- Data types
- Floating-point number (
float,double) - Composite types
- struct (
struct) - Union type (
union)
- struct (
- typedef
- Floating-point number (
- Qualifiers
- Type qualifier
- Storage-class specifier (
static) - Inline function (
inline) - Attribute
- Memory
- Preprocessor
Advanced
Libraries
Tools
Internals
C runtime startup — Systeminit function before main
Development environment
An opinionated set-up:
Quick install
choco install llvm
choco install vscodeResources
- General reference
- For an introduction to the language:
- Beej’s Guide to C Programming, by Brian Hall (2023)
- Modern C, by Jens Gustedt (2021)
- Guiding thoughts about the language
- C is Not a Low-level Language, by David Chisnall
Courses
- APS105 — Computer Fundamentals, for introductory C
- ECE243 — Computer Organization, for embedded C
- ECE344 — Operating Systems, for systems C