C Programming – Get Started

Learn C from scratch with Codekilla! This guide will take you step-by-step to write and run your first C program.

Step 1: Install Code::Blocks IDE

Code::Blocks is a free IDE that comes with a compiler (GCC).

Steps:

  1. Go to Code::Blocks Official Website
  2. Download mingw-setup.exe.
  3. Run the installer and follow instructions.
  4. Keep default settings to include the compiler.

Step 2: Open Code::Blocks

Step 3: Create a New C File

  1. Go to File > New > Empty File.
  2. Click Next, then Finish.

Step 4: Write Your First Program

  1. Type the following code:
  2. Save the file as myfirstprogram.c (File > Save File As).

Step 5: Build and Run

  1. Go to Build > Build and Run or press F9.
  2. The console will show: