C/C++ Arena

Step 1 of 5

Your first program

A program is a list of instructions the computer follows from top to bottom. C is a compiled language: you write the instructions as text (the source code), a tool called the compiler checks them and translates them into machine code the processor can run, and then the program runs. Every time you press Check, a real C compiler does exactly that in your browser.

The shape of every C program

#include <stdio.h>

int main(void) {
    printf("Hi!\n");
    return 0;
}
Hi!

Line by line:

Common mistakes

Your turn: fill in the blank so the program prints Hello, World!.

Next: Printing your own text