C ยท Chapter 1 of 45

C Introduction

C is a general-purpose, procedural programming language created by Dennis Ritchie in 1972 at Bell Labs. It gave rise to many modern languages such as C++, Java, C# and JavaScript, and it is still widely used for operating systems, embedded devices and performance-critical software.

C is a compiled language, meaning source code is translated into machine code before it runs. This makes C programs fast, but it also means you must understand memory and types more closely than in higher-level languages.

Why learn C?

C teaches you how computers actually work โ€” memory, pointers, and low-level operations. Learning C makes it much easier to understand other languages later, since so many are built on its ideas.

Where is C used?

Operating systems (Linux, Windows kernels), embedded systems (microcontrollers, IoT), databases (MySQL, PostgreSQL internals), and performance-critical applications all rely heavily on C.

Example 1 (c)
#include <stdio.h>

int main() {
  printf("Hello, World!\n");
  return 0;
}
Output
Hello, World!

This is the classic first C program that prints text to the screen.

Example 2 (c)
#include <stdio.h>

int main() {
  printf("C is fun!\n");
  return 0;
}
Output
C is fun!

Every C program needs a main() function as its entry point.

Key points

  • C was created by Dennis Ritchie in 1972.
  • C is compiled, procedural, and statically typed.
  • Many modern languages are influenced by C.
  • C is used in OS kernels, embedded systems and performance-critical code.
๐Ÿ’ก Note: Understanding C deeply will make learning almost any other language easier.

๐Ÿ“ Quick Quiz

1. Who created C?

2. C is a:

3. Which is NOT a common use of C?