C Intro Course / Chapter 1 — Getting Started with C (lessons 1–7) / Lesson 1

What Is C? (The 4 Stages of Compilation)

Time needed: about 4 min (estimate)

☆ Read later

You can try the opening of this lesson without an account.

Where does C actually run?

C was born around 1972 to build Unix, and it's still running today inside the Linux kernel, the interpreters for Python (CPython), Ruby, and PHP, the microcontrollers in appliances and cars, and libraries like SQLite, zlib, and OpenSSL.

Learning C makes visible everything other languages are doing for you behind the scenes.

Rust's ownership system is a language-level mechanism for managing what, in C, you'd have to free yourself, and Linux system calls are most naturally called as plain C functions.

Your first program

#include <stdio.h> pulls in the declarations (a header file) you need to use printf.

int main(void) is the program's entry point — int means "returns an integer," and void means "takes no arguments."

Every statement ends with a ;.

This course runs everything inside a Docker container with gcc 16.2.0 installed (setup instructions are in Lesson 2).

Create a free account to keep reading

With an account you can read the rest of this lesson, take the quiz, and read every free lesson in this course. Lessons you answer correctly are recorded as complete.

Report a problem with this lesson

Log in to send a report.

Keyboard shortcuts

Keys available in a lesson
KeyAction
[ or Alt + ←Go to the previous lesson
] or Alt + →Go to the next lesson
?Open this list
EscClose this list

The keys do not work while the cursor is in a code editor or an input field.