How to Install and Run C Programs on Windows
This tutorial explains 3 popular methods to start writing and running C programs on a Windows PC:
- OnlineGDB (Online)
- Dev-C++ (Offline)
- Turbo C++ (Legacy)
1. Using OnlineGDB (No Installation)
Website: https://www.onlinegdb.com/online_c_compiler
Steps:
- Open the website.
- Select "C" from the language drop-down.
- Type or paste your C code in the editor.
- Click the Run button.
Benefits:
- No installation required.
- Works on any device (Windows, macOS, Linux).
- Supports
scanf(), input/output, and debugging. - Great for practicing on the go or during exams.
2. Installing Dev-C++ (Modern Offline Option)
Download: https://sourceforge.net/projects/orwelldevcpp/
Steps:
-
Download the Dev-C++ installer.
-
Run the setup and install it.
-
Open Dev-C++ and create a new file: File > New > Source File
-
Write your C code and save with
.cextension. -
Click Execute > Compile & Run (F11).
Benefits:
-
Lightweight and easy to use.
-
Built-in compiler (GCC) — no need to install separately.
-
Ideal for students and beginners.
-
Supports modern C standards.
GCC stands for GNU Compiler Collection.
It is a powerful, open-source compiler system developed by the Free Software Foundation (FSF) under the GNU Project.
3. Installing Turbo C++ (Old DOS-Based)
Download (Turbo C++ for Windows):
https://turbo-c.net/turbo-c-download/
Steps:
-
Download and install Turbo C++ with DOSBox preconfigured.
-
Launch Turbo C++ via the installed shortcut.
-
Write your program in the editor and save it.
-
Press Ctrl + F9 to compile and run.
Benefits:
-
Matches many school/college syllabi (especially in India).
-
Familiar UI for those taught using older tools.
Drawbacks:
-
Old 16-bit system; doesn’t support modern Windows natively.
-
Requires DOSBox emulation.
-
Not compatible with modern C standards.