the hello world program
Almost every programmer's first program in a new language does one tiny thing: print the words 'Hello, world!' and stop. It is the traditional warm-up - small enough to type from memory, yet it proves the whole chain works: you can write source, compile it, run it, and see output. The phrase was popularized by the 1978 book by Kernighan and Ritchie that introduced C, and it stuck.
Here is the heart of the C version. You include a header to get access to printing, define a function named main that the system runs first, call a library function to print the text, and return a value to signal success. main is special: it is the agreed entry point where a C program begins, and the value it returns becomes the program's exit status that the operating system sees. The full source is small enough to hold in your head, yet it quietly exercises the standard library, the compiler, the linker, and the loader all at once.
Why it matters: hello world is a teaching artifact, not a serious program, but it is a perfect first map of the territory. It introduces main and the idea of an entry point, the standard library (printf), returning an exit status, and the edit-compile-run loop end to end. When hello world builds and runs, your toolchain and environment are working - which is exactly why it is the first thing you do on any new platform or setup.
#include <stdio.h> int main(void) { printf("Hello, world!\n"); return 0; }
The classic C hello world: include, main, print, return 0 for success.
Tiny as it is, hello world is not trivial underneath: printf goes through the C standard library, which buffers the text and ultimately makes a write() system call into the kernel to reach your screen. The simplicity is on the surface.