C Basics
C is a compiled, statically-typed language from 1972 that still powers operating systems, databases, and language runtimes today. Learning C means learning how a computer actually works, no hidden garbage collector, no implicit conversions you didn't ask for, just you and the machine.
Your first program
#include <stdio.h>pulls in the standard I/O library, soprintfexists.int main(void)is the entry point every C program starts from, it returns anintexit code to the operating system,0means "success".printfformats and prints text,\nis a newline escape sequence, unlike Python there's no automatic newline after a print.
Compiling and running
C is compiled ahead of time, there's no interpreter:
gcc hello.c -o hello
./hello
gcc translates your .c source file into a native executable, -o hello names the output file. Every time you change the source, you recompile before running again.
Variables and types
Unlike Python or JavaScript, every variable in C has a fixed, explicit type:
There's no var/let inference, you declare the type up front and it never changes. This is why C is fast, the compiler knows exactly how much memory each variable needs and never has to check types at runtime.
TIP
C has no built-in string type, a "string" is really just an array of char ending in a special \0 (null terminator) byte. You'll see why that matters a lot once we get to pointers.