Back to Blog

C in 100 Seconds: Your First C Program | Episode 1

Daryl WongDaryl Wong

Video: C in 100 Seconds: Your First C Program | Episode 1 by Taught by Celeste AI - AI Coding Coach

Watch full page →

Your First C Program — Hello, World

C in 100 Seconds, Episode 1


Every programming journey starts somewhere. In C, it starts with six lines of code, a compiler, and a terminal.

The Include

#include <stdio.h>

This line pulls in the Standard I/O library. Without it, C has no idea how to print anything. stdio.h gives you printf, scanf, and other functions for input and output.

The Main Function

int main() {
  // your code goes here
  return 0;
}

Every C program begins execution at main. The int means it returns an integer. return 0 tells the operating system everything went fine. A non-zero return signals an error.

Printing Output

printf("Welcome to C in 100s!\n");

printf prints formatted text to the terminal. The \n at the end is a newline character — it moves the cursor to the next line.

Full Code

#include <stdio.h>

int main() {
  printf("Welcome to C in 100s!\n");
  return 0;
}

Compile and Run

gcc hello.c -o hello
./hello

gcc is the GNU C Compiler. It takes your source file (hello.c), compiles it into a binary (hello), and then you run it. That's the C workflow: write, compile, run.


Next episode: Variables and Types — storing data with int, float, char, and double.

Student code: github.com/GoCelesteAI/c-in-100-seconds/episode01