Unlike JavaScript, C code doesn't run directly — it must be compiled into machine code first. The two most common compilers are GCC (GNU Compiler Collection) and Clang.
# Linux (Debian/Ubuntu)
sudo apt update && sudo apt install build-essential
# macOS — installs Clang via Apple's Command Line Tools
xcode-select --install
# Windows — easiest path is either:
# 1. WSL (Windows Subsystem for Linux), then follow the Linux steps above
# 2. MinGW-w64, which provides a native gcc.exe
# Verify installation
gcc --version
For an editor, VS Code with the "C/C++" extension (from Microsoft) is a solid free choice, providing syntax highlighting, IntelliSense, and integrated debugging; CLion is a more full-featured (paid) IDE built specifically for C/C++. Many experienced C developers still work happily with a plain text editor and the terminal, since the compiler itself does most of the heavy lifting.
Once installed, compiling and running a file is a single pair of commands:
gcc -std=c17 -Wall -Wextra -o app main.c
./app
Note the -std=c17 flag — it tells GCC which C standard to target. C23 support is newer: it requires GCC 13+ or Clang 17+ (use -std=c23, or -std=c2x on slightly older compiler versions). Always check gcc --version before relying on C23-only features, and fall back to -std=c17 if your compiler is older.