Aral Code

Getting Started Lesson 1 of 16

Introduction to C Programming

What the C language is, its history, where it's used today, why it's worth learning, and the parts of a first C program.

C was created by Dennis Ritchie at Bell Labs in 1972 to build the UNIX operating system. More than fifty years later, it still runs the world: the core of Windows, Linux, Android and macOS, the firmware in washing machines and cars, and the engines of many other languages are written in C.

Your first C program

#include <stdio.h>

int main(void) {
    printf("Mabuhay, Pilipinas!\n");
    return 0;
}

Output

Mabuhay, Pilipinas!

Every part has a job:

  • #include <stdio.h> brings in the standard input/output library, which contains printf.
  • int main(void) is the main function. Every C program starts running here.
  • printf(...) prints text. \n moves to a new line.
  • return 0; tells the operating system the program finished successfully.
  • Curly braces { } mark the start and end of the function, and statements end with ;.

Why learn C?

  • It shows how computers work. You manage memory yourself and see how data is stored in bytes.
  • It's fast. C programs run close to the hardware with almost no overhead.
  • It's everywhere. Microcontrollers like Arduino use C/C++, and so do operating systems and game engines.
  • Other languages are built on it. C++, C#, Java, JavaScript and PHP borrowed C's syntax: if, for, while, braces and semicolons. Learn C, and they all look familiar.

Where is C used?

AreaExamples
Operating systemsLinux kernel, parts of Windows and macOS
Embedded systemsMicrowaves, ATMs, car engine controllers, Arduino projects
DatabasesMySQL, SQLite, PostgreSQL
Languages and toolsThe standard Python interpreter, Git

Compiled to machine code

C is a compiled language. A program called a compiler (like GCC or Clang) translates your .c source file directly into machine code your computer's processor understands. The result is an executable file (.exe on Windows) that runs on its own.

hello.c  ──compiler (gcc)──▶  hello.exe  ──▶  runs directly on the CPU

C is powerful, and unforgiving

C trusts the programmer completely. It won't stop you from reading past the end of an array or using memory you've already freed. Those mistakes can cause strange results or crashes. This course points out these traps, and learning to avoid them makes you a careful programmer in any language.

C versus C++

C++ started as "C with classes" in the 1980s. It adds object-oriented programming and many features on top of C. Most C code also works in C++, but they're now separate languages. If you plan to take our C++ course, learning C first is a great foundation.

Quick Quiz

Check what you learned. Walang grade ito, practice lang. 🙂

1. Who created C?
2. Which header provides printf?
3. What does \n do in printf?
4. What does return 0; in main mean?

By Sir Reyel · Last updated 2026-12-04