Thuta Learning
BasicProgrammingbeginner

Get Started

Relax. We'll talk through this in plain words — no textbook voice.

To run C code, you need a compiler. A compiler is a tool that turns the .c file you wrote into an executable program the computer can understand. While you're just starting out, an online editor works fine — but once you want to build a real project, it's better to set up GCC or Clang on your local machine.

c
// hello.c
#include <stdio.h>

int main() {
  printf("Hello C learner!
");
  return 0;
}

#include <stdio.h> pulls in the library that lets you use printf(). main() is where the program starts running, and return 0; tells the operating system the program finished successfully.

You should see
Hello C learner!

Info

Save the file hello.c with a .c extension. In the terminal, compile it with gcc hello.c -o hello and run it with ./hello.

Easy traps

  • If you type gcc in the terminal without a compiler installed, you might get "command not found." In that case, set up a compiler first, or use the online editor via the "Start coding" button.
Get Started | Thuta Learning