0% found this document useful (0 votes)
55 views

History of C Programming Language: Laboratories" of USA in 1972

C is a programming language created in 1972 by Dennis Ritchie at Bell Laboratories to develop the UNIX operating system. It was designed to be compiled efficiently and allow direct access to memory for system programming tasks like operating system development. Today, C is widely used to develop operating systems like Linux and language compilers due to its low-level capabilities and ability to generate efficient executable code.

Uploaded by

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

History of C Programming Language: Laboratories" of USA in 1972

C is a programming language created in 1972 by Dennis Ritchie at Bell Laboratories to develop the UNIX operating system. It was designed to be compiled efficiently and allow direct access to memory for system programming tasks like operating system development. Today, C is widely used to develop operating systems like Linux and language compilers due to its low-level capabilities and ability to generate efficient executable code.

Uploaded by

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

History of C Programming Language

·0 C is a programming language which born at “AT & T’s Bell


Laboratories” of USA in 1972.

·1 It was written by Dennis Ritchie.

·2 This language was created for a specific purpose : to design the UNIX
operating system (which is used on many computers).

·3 Many of its principles and ideas were taken from the earlier language
B

·4 Ken Thompson was the developer of B Language.

·5 As many of the features were derived from “B” Language thats why
it was named as “C”.

·6 The language was formalized in 1988 by the American National


Standard Institute (ANSI).

·7 Today's most popular Linux OS and RBDMS MySQL have been written
in C.

·8 After 7-8 years C++ came into existence .


C Programming Inventor :
Father of C Programming : Dennis Ritchie
Born On September 9 1941
Born in Bronxville – New York
Full Name Dennis MacAlistair Ritchie
Nickname DMR
Nationality American
Graduate From Harvard University
Graduate In Physics and Applied Mathematics
Dead On October 12, 2011

Features of C Programming Language :


C Programming is widely used in Computer Technology, We can say that C
Programming is inspiration for development of other languages. We can use
C Programming for different purposes. Below are some of the Features of C
Programming language -
1 . Low Level Features :

* C Programming provides low level features that are generally provided


by the Lower level languages. C is Closely Related to Lower level Language
such as “Assembly Language“.

* It is easier to write assembly language codes in C programming.


2 . Portability :

* C Programs are portable i.e they can be run on any Compiler with
Little or no Modification.

*Compiler and Preprocessor make it Possible for C Program to run it on


Different PC.

3 . Powerfull

*Provides Wide verity of ‘Data Types‘.


*Provides Wide verity of ‘Functions’.
* Provides useful Control & Loop Control Statements.
4 . Modular Programming

*Modular programming is a software design technique that increases the


extent to which software is composed of separate parts, called modules.

*C Program Consist of Different Modules that are integrated together to


form complete program.

5 . Efficient Use of Pointers


*Pointers has direct access to memory.
*C Supports efficient use of pointer .

Application of C Programming are listed below -

1. C language is used for creating computer applications.


2. Used in writing Embedded softwares.
3. Firmware for various electronics, industrial and communications
products which use micro-controllers.
4. It is also used in developing verification software, test code,
simulators etc. for various applications and hardware products.
5. For Creating Compiles of different Languages which can take input
from other language and convert it into lower level machine dependent
language.
6. C is used to implement different Operating System Operations.
7. UNIX kernel is completely developed in C Language.

What is Compiler ?
1. A computer program which reads source code and outputs assembly
code or executable code is called compiler.
2. A program that translates software written in source code into
instructions that a computer can understand Software used to translate the
text that a programmer writes into a format the CPU can use.
3. A piece of software that takes third-generation language code (machine
code executable from assembly code) and translates it into a specific assembly code.
Compilers can be quite complicated pieces of software.

Consider process of Executing Simple C Language Code –


We have opened C Code editor and wrote simple C Program , Whenever we
try to compile code and try to execute code our code is given to the
compiler.
int main()
{
printf("Hello");
return(0);
}
After Passing through all the compilation Phases our code is converted into
the machine level language code which can be read by machine.
100010100011111
100001111000001

Difference between Compiler and Interpreter

1. Compiler Takes Entire program as input where Interpreter Takes Single


instruction as input .
2. Intermediate Object Code is Generated but No Intermediate Object Code
is Generated in Interpreter.
3. Example : C Compiler where Example : BASIC

Step By Step Execution Of C Program


Step 1 : Edit
1. This is First Step i.e Creating and Editing Program.
2. First Write C Program using Text Editor , such as [ Borland C/C++ 3.0 ,
Notpad++,Notpad ]
3. Save Program by using [.C] Extension.
4. File Saved with [.C] extension is called “Source Program“.

Step 2 : Compiling
1. Compiling C Program : C Source code with [.C] Extension is given as input
to compiler and compiler convert it into Equivalent Machine Instruction.
2. In Borland C/C++ 3.0 program can be compiled using key [Alt + F9 ].
3. Compiler Checks for errors . If source code is error-free then Code is
converted into Object File [.Obj ].

Step 3 : Checking Errors


1. During Compilation Compiler will check for error, If compiler finds any
error then it will report it.
2. User have to re-edit the program.
3. After re-editing program , Compiler again check for any error.

Type of Languages :
Low Level Language
Middle Level Language
High Level Language
What is Low level Language in Computer Science ?
·9 Machine understandable Language.

·10 Internal Machine Code dependent


·11 Assembly is Common Low Level Language

·12 Fast to Run But slow to write & Understand

Middle Level Language ?


C Programming bridges gap between traditional Machine Understandable
Machine Level language and more conventional High level languages. User
can Use C Language to do system programming for writing operating system
as well as application programming.
Middle Level Programming languages are closely related to
Machine as well as Human Being.

Why C is Middle Level Language ?


·13 C Programming Supports Inline Assembly Language Programs .

·14 Using inline assembly language feature in C we can directly access


system registers.
·15 C Programming is used to access memory directly using pointer.

·16 C Programming also Supports high Level Language Features.

·17 It is more User friendly as compare to Previous languages so C


programming is Middle Level Language.

High level Language :


·18 First high-level programming languages were designed in the 1950s.

·19 High level Language is Human understandable Language.

·20 English is Common example of High Level Language.

·21 High level Language is Internal Machine Code Independent.

·22 High level Language is Developed for providing GUI Interface.


·23 Visual Basic, Ada, Algol, Pascal and JAVA are high level
languages.

C Programming can be considered as High Level /


Low Level -
* In early 70′s , C Programming was considered as High Level language
because it was capable of evaluating expressions,parenthesis recursive
functions etc.

* Nowadays C may be considered as “Low Level Language” by some


programmer because it lacks a large runtime-system (no garbage collection,
etc.)

Comments in C :
Single Line Comment in C Programming:
Comments are non-executable code used to provide documentation to
programmer. Single Line Comment is used to comment out just Single Line
in the Code. It is used to provide One Liner Description of line.
Some Importatnt Points :
·24 Single Line Comment Can be Placed Anywhere

·25 Single Line Comment Starts with ‘//’

·26 Any Symbols written after ‘//’ are ignored by Compiler

Example :
#include<stdio.h>
void main()
{
printf("Hello"); //Single Line Comment
printf("By");
}
Multi Line Comment in C Programming:
Some Importatnt Points :
·27 Multi Line Comment Can be Placed Anywhere.

·28 Multi Line Comment Starts with ‘/*’ .

·29 Multi Line Comment Ends with ‘*/’ .

·30 Any Symbols written between ‘/*’ and ‘*/’ are ignored by Compiler.

Example :
#include<stdio.h>

void main()

printf("Hello");

/* Multi

Line

Comment

*/

printf("By");

Way to use for Program Title and Documentation

/****************************************

* Title : Program Name *

* Author: Author Name *

***************************************/
Hiding Code using Comments :
Single Line Comments are useful where you need to comment or hide two-
three words however multiple line comments are useful where you want to
hide multiple lines of code.
/*

for(i=0;i<num;i++)

printf("\nEnter the Number : ");

scanf("%d",&arr[i]);

*/

i.e Suppose we want to hide multiple lines then instead of using single line
comment before each line we can use multiple line comment.
for(i=0;i<num;i++)

printf("\nEnter the Number : ");

scanf("%d",&arr[i]);

// i++;

########################################################################
###############################################Variables and Constants

You might also like