Advertisement

Setup C Environment

C Language Getting Started 📅 May 2026 ⏱ 1 min read 🆓 Free

Setting Up C Programming Environment

To write C programs, you need: (1) a Text Editor to write code and (2) a Compiler to convert your code into a working program.

Option 1: Dev-C++ — Best for Windows Beginners

  1. Download from sourceforge.net/projects/orwelldevcpp
  2. Install (just click Next through the steps)
  3. Open Dev-C++ → File → New → Source File
  4. Write your code
  5. Press F11 to compile and run — done!

Option 2: VS Code + GCC — Professional Setup

bash
# Windows: Download MinGW from mingw-w64.org
# Add C:\Program Files\mingw64\bin to PATH

# Linux (Ubuntu/Debian)
sudo apt-get update && sudo apt-get install gcc build-essential

# macOS
brew install gcc

# Verify installation
gcc --version
# Should show: gcc (GCC) 13.x.x

Option 3: Online Compiler — Zero Installation!

WebsiteBest FeatureLink
onlinegdb.comBuilt-in debuggeronlinegdb.com
replit.comSave and share projectsreplit.com
programiz.comBeginner friendly interfaceprogramiz.com/c-programming/online-compiler

Compile and Run — Terminal Commands

bash
# Step 1: Write code in hello.c
# Step 2: Compile
gcc hello.c -o hello

# Step 3: Run (Linux/Mac)
./hello

# Step 3: Run (Windows)
hello.exe

# With warnings enabled (recommended)
gcc -Wall -Wextra hello.c -o hello
💡 Tip: Start with an online compiler if you just want to learn! Once comfortable, set up a local IDE. Replit.com is completely free and works in any browser.
Advertisement
← Back to C Language Index