You are on page 1of 16

INSTITUTE OF TECHNOLOGY

AND MANAGEMENT
GIDA , GORAHKPUR

Presentation on – C language
Presented by – Sonika Gupta
Section – C , Year – 2nd
Roll NO. – 2201200100173
CONTENT
S
• Introduction of C
• Uses of C
• Importance of C
• Historical development of c
• Constants
• variables
• Keywords
• Basic C Program (in /out)
• Array, pointer
• Structure and Union
INTRODUCTION of C
• C is a general-purpose programming language created
by Dennis Ritchie at the Bell Laboratories in 1972.
• It is a very popular language, despite being old. The
main reason for its popularity is because it is a
fundamental language in the field of computer science.
• C is often called a middle level language because it
combines the best element of low level language or
machine level language with high level language .
INTRODUCTION of C
• C is a general-purpose programming language created
by Dennis Ritchie at the Bell Laboratories in 1972.
• It is a very popular language, despite being old. The
main reason for its popularity is because it is a
fundamental language in the field of computer science.
• C is often called a middle level language because it
combines the best element of low level language or
machine level language with high level language .
USES of C
• C language is used to creating computer software.

Software

System software Application software


IMPORTANCE of C
• C is very simple language.
• There is only 32 keyword so c is very easy to master.
• C is structured language.
• C is highly portable.
• C is middle level language.
• C is also called mother of some most other language.
• C is very fast execution speed.
• C has the ability to extend it self.
HISTORICAL DEVELOPMENT OF C
• To learn about the history c language , lets first start with its root and
early developments.
• The root of all modern language is ‘ALGOL’ which stands for algorithmic
language .
• ALGOL was the first computer programming language to use a block
structure , and it was introduced in 1960.
• In 1960, a new computer programming language was announced called
as BCPL which stands for basic combined programming language .
• BCPL was designed developed by Martin Richards .
• BCPL was derived from ALGOL .
• In 1970 , ken Thompson created a language using
BCPL called B .
ALGOL
• In 1972 , a great computer scientist Dennis Ritchie
created a new programming language called C at
bell laboratories . BCPL
• C language was created from ‘ALGOL’ , ‘BCPL’, ‘B’
programming languages.
B
• C programming language contains all the features of
these languages and many more additional
concepts that make it unique from other language . C
VARIABLES
• A variable is a constant which stores a value.
• In kitchen we have containers storing rice, dal, sugar etc. similar to
that variables in c stores value of a constant.
• Eg - a= 3; // a is assigned “3”
b= 4.7; // b is assigned “4.7”
c=‘a’; // c is assigned ‘a’
RULES FOR NAMING VARIABLES IN
C
• First character must be an alphabet or underscore ( _ )
• No commas , blanks allowed.
• No special symbol other then (_) allowed.
• Variables names are case sensitive .

We must create meaningful variable name in our programs this


enhances readability of our program.
CONSTANTS
• A entity whose value doesn’t change is called as a constant.
• A variable is an entity whose value can be changed .

Types of constants
Primarily , there are three types of constants.
1. Integer constant
2. Real constant
3. Character constant
KEYWORDS
• These are reserved words , whose meaning is already known to the
compiler .
• There are 32 keywords available in C .
BASIC C PROGRAM
#include<stdio.h.
Int main (){
printf (“ hello I am Sonika”);
Return 0 ;
}
ARRAYS
• It is a collection of similar data types stored at contiguous memory
location .
• syntax
int marks [3];
char name [10];
float price [2];
POINTERS
• A pointer is a variable which stores the address of another
variable .

72 87994

Address-87994 Address-87994

STRUCTURE
• A collection of values of different data types.
UNION
• Union has members of different data types, but can hold data of only
one member at a time.

• The different members share the same memory location.

• The total memory allocayed in the union is equal to the maximum size
of the members.

You might also like