basics · beginner · ~15 min
Confirm your C toolchain works end-to-end: compile, link, run, exit 0.
Print the exact line Hello, World! to standard output. This is the smallest possible C program, and its real job is to prove your toolchain compiles and runs a program end-to-end.
Write a complete program (including main) that prints Hello, World! followed by a single newline, then exits successfully.
None. The program reads nothing from standard input.
The 13 characters Hello, World! followed by exactly one newline character, and nothing else. The output is graded byte-for-byte.
The program takes no input. Expected output (exact bytes):
Hello, World!
That is the text Hello, World! terminated by a single newline.
printf from <stdio.h>.0 from main to signal success.Hello-world is the smallest possible proof that your environment is real. Skip it and you'll spend an hour debugging an exercise when the actual problem was a missing #include.
None — the program reads nothing from standard input.
The line Hello, World! terminated by a single newline, and nothing else.
Use printf from <stdio.h>; return 0. Output is graded byte-for-byte.
#include <stdio.h>
int main(void) {
/* TODO: print Hello, World! */
return 0;
}
Missing #include <stdio.h> (compiler can't find printf). Forgetting the \n at the end. Using print (Python habit) or cout (C++ habit).
Off-by-one whitespace. Mismatched newline. Trailing space before the \n.
O(1) — just a single call to printf.
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.