Skip to main content

C Programming Introduction

C is a general-purpose, procedural programming language developed by Dennis Ritchie in 1972 at Bell Laboratories. It follows a step-by-step approach and uses functions to perform tasks. C is known for its speed, efficiency, and closeness to hardware, making it ideal for system-level programming — operating systems, embedded systems, and compilers are all built with C. Programs in C are written using English-like statements and can run on almost any computer, making it highly portable.

History of C

The lineage of C traces through several languages:
  • 1960 — ALGOL: First language to use a block structure.
  • 1967 — BCPL: Developed by Martin Richards, derived from ALGOL.
  • 1970 — B: Created by Ken Thompson using BCPL. Both BCPL and B were type-less.
  • 1972 — C: Developed by Dennis Ritchie at Bell Labs using BCPL and B.

Why Learn C?

  • Foundation for C++, Java, Python, and most modern languages.
  • Used in OS kernels, microcontrollers, game engines, and databases.
  • Teaches low-level memory management and hardware interaction.
  • Fast execution with minimal abstraction overhead.

C Language Versions

VersionYearKey Features
K&R C1978First version, by Kernighan & Ritchie
ANSI C / C891989First standardized version
C901990International standard of ANSI C
C951995Added wchar_t
C991999inline, // comments, long long int
C112011Multithreading, _Atomic, safer functions
C172018Bug fixes and clarifications
C23 (latest)2024Better Unicode, type inference

Structure of a C Program

#include <stdio.h>    // Preprocessor directive

int main() {          // Entry point of every C program
    printf("Hello, World!\n");
    return 0;
}
ComponentPurpose
#include <stdio.h>Includes the standard input/output library
int main()Every C program starts executing from main()
printf()Prints output to the screen
return 0Returns 0 to indicate successful execution