History of C Programming
- The C Programming Language was created by Dennis Ritchie and Ken Thompson at AT&T Bell Labs.
- It was influenced by BCPL (Basic Combined Programming Language).
- In 1965, the development of the Multics operating system started.
- Due to various reasons, this development was halted in 1969.
- Later, Dennis Ritchie joined AT&T Bell Labs and resumed the creation of an operating system, leading to the development of Unix.
- Initially, the Unix operating system was written in Assembly Language.
- To overcome the difficulties of Assembly Language, Dennis Ritchie created C Programming in 1972.
- Initially, C was considered a system programming language, but it later evolved into a general-purpose programming language.
Standardization of C Programming
The C Programming Language was standardized by multiple organizations:
- K & R Standard (Kernighan & Ritchie Standard) – 1978
- ANSI Standard (American National Standards Institute) – 1983 (C89)
- ISO Standard (International Organization for Standardization) – 1990 (C90)
- C99 Standard – 1999
C Programming Language is supported by various standardization teams, ensuring consistency and portability.
Features (Characteristics) of C Programming
- General Purpose Programming Language – C can be used to write any kind of software application.
- Procedural Programming – C supports procedural programming through the use of functions.
- Block Structured – Code in C is organized within blocks defined by curly brackets
{}
. - Compiled – C is a compiled language, which means the code is translated into machine code by a compiler.
- Free Flow – C allows the flow of control to be transferred from one point to another.
- Statically Typed – C requires explicit declaration of data types.
- Native – C interacts directly with the operating system.
- Standardized – C has been standardized by multiple organizations (K&R, ANSI, ISO, C99).
Basic Structure of a C Program
Explanation of the Above Program
#
is a preprocessor directive symbol.#include
is used to include the necessary header files.stdio.h
is the header file that contains functions for standard input-output operations.int
indicates the return type of the main function.main
is the name of the entry point function where the execution of the program begins.- The function block is enclosed in curly brackets
{}
. printf
is the function responsible for displaying data on the screen.\n
is used to insert a new line on the screen.- A semicolon
;
at the end of a line is mandatory to indicate the end of that statement. - The data within double quotes
""
is considered a string to be displayed on the screen. return 0
at the end of the main function indicates the successful execution of the program, returning 0 to the operating system.