0% found this document useful (0 votes)
0 views6 pages

History

The C programming language was developed by Dennis Ritchie in 1972 at AT&T Bell Laboratories, evolving from earlier languages like B and ALGOL. It gained popularity after the publication of 'The C Programming Language' by Kernighan and Ritchie in 1978, leading to the establishment of ANSI C standards in 1989 and ISO standardization in 1990. The document also outlines the basic structure of a C program, including sections for documentation, linking, definitions, global declarations, the main function, and user-defined functions.

Uploaded by

lokichaulagain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views6 pages

History

The C programming language was developed by Dennis Ritchie in 1972 at AT&T Bell Laboratories, evolving from earlier languages like B and ALGOL. It gained popularity after the publication of 'The C Programming Language' by Kernighan and Ritchie in 1978, leading to the establishment of ANSI C standards in 1989 and ISO standardization in 1990. The document also outlines the basic structure of a C program, including sections for documentation, linking, definitions, global declarations, the main function, and user-defined functions.

Uploaded by

lokichaulagain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

History of C

Structure of C
By: Karna Bahadur Shrestha

Prepared By: Karna Bahadur Shrestha


History of C
The C programming language is developed by Dennis Ritchie at AT&T Bell Laboratories in
1972. It is named C because many features of C were derived from an earlier language called B.

The history of C language goes back to 1960’s, when a number of computer languages were
being used for various purposes. COBOL (Common Business-Oriented Language) was being used
for commercial purposes, FORTRAN (Formula Translation) was being used for scientific and
engineering applications and so on.

Most of the modern languages including C are derived from the algorithmic language called
ALGOL which was developed by international group and introduced in 1960’s.

Martin Richards in 1967 developed programming language called BCPL (Basic Combined
Programming Language) which was derived from ALGOL. Similarly, BCPL influenced
development of programming language called B by Ken Thompson in 1970.

In 1972, Dennis Ritchie introduced “Traditional C” and it was confined to use within Bell
Laboratories until 1978.
In 1978, Brian Kernighan and Dennis Ritchie published a book called “The C Programming
Language”. The book was so popular and the use of C started spreading. C Language at that time
is commonly referred to as “K&R C”.
In 1983, the American National Standards Institute formed a committee to produce a C
programming language standard. This “ANSI C” was completed in 1988, and was approved in
1989. It was then approved by the International Organization for Standardization (ISO) in 1990

Prepared By: Karna Bahadur Shrestha


Brief History of C Language
1. 1960 - ALGOL - Developed by International Group
2. 1967 - BCPL - Developed by Martin Richards
3. 1970 - B - Developed by Ken Thompson
4. 1972 - C - Developed by Dennis M. Ritchie
5. 1978 - K&R C - Developed by Brian w. Kernighan and Dennis M. Ritchie
6. 1989 - ANSI C - Developed by ANSI Committee
7. 1990 - ANSI/ISO C - Standardaized by ISO

C Programming language has following features:


 C Language is well suited for structured modular programming.
 Programs written in C are efficient and executes much faster.
 C is powerful and feature rich programming language with rich set of built-in functions,
data types and operators.
 C is highly portable language i.e. code written in one machine can be moved to other.
 C supports low level feature like bit level programming and direct access to memory
using pointer.
 C has only 32 keywords and several standard built-in functions which can be used for
developing different program.
 C has high level constructs and it is more user friendly.

Prepared By: Karna Bahadur Shrestha


Basic Structure of C program.
The structure of C program implies the composition of a program that answers questions such as
what are the main components to write in C program? How they are organized etc.

Documentation Section
Link Section
Definition Section
Global Declaration Section
main() function Section
{
Declaration Part
Execution Part

Sub program section

Function 1
Function 2
-----------
--------------
Function N

User defined functions

Documentation Section
This section contains a set of comment lines giving the name of the program, the author,
algorithms, method used and other details. This will be useful in future for users and developing
teams. The documentation acts as a communication medium between members of the development
team when a number of developers is working in the same project.
For example.
/* Author:Karna
Program to calculate area of rectangle.
Created at 2021-4-26 */

Prepared By: Karna Bahadur Shrestha


Link Section/Header Declaration Section
This section provides instruction to compiler to link functions with the program from the system
library.
For example
#include<stdio.h>
Links the input/output functions like printf(),scanf() with the
program.

Definition Section
All symbolic constants are defined in this section.
#define PI 3.14

Global Declaration Section


Global variables are defined and declared in this section. The variables that are used in more than
one functions or blocks are called global variables. This section also declares all the user defined
functions, that informs the compiler about the name of function, its return type(if any) and the data
types of the function arguments(if any).
For example.
int a=10;
int add(int,int); //user defined function to add integer number
that need two integer arguments

main() Function section


The main function is the starter of the C program, the execution of the program always start from
main function. Each program should have main function and the main function should be only one
in the entire program. Within main function there are declaration and executable parts. The
declaration parts declares the variables used in the execution part.
For example:
int a=10;
int b=20;
int c;
The execution part has operations like:
c=a+b;

Prepared By: Karna Bahadur Shrestha


Sub Program section
This section contains all user defined functions which are being called in the main function.

/* Author: Karna
Created at:2021-04-26
Program that calculates area of circle
*/

#include<stdio.h> //link or header declaration section


#define PI 3.14 //Definition section defining symbolic constant

int main()
{
int radius=5; //variable declaration
float area; //variable declaration

area= PI*radius*radius;
printf("The area of circle is: %f",area);
return 0;

Note: All the section except main() and header declaration may be absent when they are not
required.

Prepared By: Karna Bahadur Shrestha

You might also like