C Programming C++ Java JavaScript Kotlin PHP Python

💻 C Programming

Learn the basics of C programming, including variables, loops, and functions.

Setting Up the C Environment::Using IDEs (Code::Blocks, VS Code, Dev-C++)

1.Code::Blocks


What is Code::Blocks?

Code::Blocks is a free and open-source IDE that comes with the MinGW GCC compiler, making it one of the easiest environments for beginners.

How to Install Code::Blocks (Recommended Version)

  1. Visit the official Code::Blocks website.

  2. Download "Code::Blocks — MinGW Setup" (very important because it includes the compiler).

  3. Install using default settings.

  4. Launch Code::Blocks → It will automatically detect the GCC compiler.

Creating a New C Project

  1. Open Code::Blocks

  2. Select File → New → Project

  3. Choose Console Application

  4. Select C language

  5. Enter:

    • Project name

    • Save location

  6. The IDE generates a main.c file with starter code.

Compiling & Running

  • Press F9 (Build and Run)

  • Your output window appears and displays program results.

Why Code::Blocks is great for beginners

  • No manual compiler setup

  • Simple interface

  • Lightweight and stable

  • Automatic project structure setup


2.Visual Studio Code (VS Code)


What is VS Code?

VS Code is a powerful, flexible, and professional code editor. It supports C programming through extensions.

Installing VS Code

  1. Download and install VS Code.

  2. Install the C/C++ Extension (Microsoft).

  3. Install the Code Runner extension (optional for easy running).

Installing GCC Compiler

Because VS Code does not come with its own compiler, you must install one:

Windows (MinGW):

  1. Download MinGW-w64

  2. Install with default settings

  3. Add the MinGW /bin folder to Environment Variables → PATH

Verify installation:

gcc --version

If it shows a version number, GCC is ready.

Creating & Running a C Program in VS Code

  1. Create a folder

  2. Open the folder in VS Code

  3. Create a file named main.c

  4. Write your C code

Compile:

gcc main.c -o program

Run:

./program

Or use Code Runner → Click Run.

Why many students and professionals prefer VS Code

  • Modern and clean UI

  • Thousands of extensions

  • Powerful debugging tools

  • Best for multi-language development


3.Dev-C++


What is Dev-C++?

Dev-C++ is a very lightweight IDE for C and C++. It comes with a built-in GCC compiler, so no extra configuration is needed.

Installation

  1. Download Embarcadero Dev-C++

  2. Install using default settings

  3. Open the IDE — compiler is ready to use

Creating a C Program

  1. Go to File → New → Source File

  2. Write your C code

  3. Save your file with .c extension

Compile and Run

  • Compile: Press F11

  • Run: Press Ctrl + F10

Why Dev-C++ is still popular

  • Extremely fast and light

  • Beginner-friendly

  • Works well on low-spec computers


Summary Comparison Table

IDE / EditorCompiler SetupDifficultyBest For
Code::Blocks  Built-in GCCEasiestBeginners
VS CodeManual GCC install needed MediumIntermediate & professionals
Dev-C++Built-in GCCEasyLow-end PCs

No quizzes yet

Quizzes to test your knowledge coming soon!

📚 Recent Tutorials

Explore the latest tutorials added to our platform

Code copied to clipboard!