Upload
sreenivasulu-reddy
View
233
Download
0
Embed Size (px)
Citation preview
8/2/2019 C Language Main Topics
1/6
C LANGUAGEMAIN TOPICS
Presented By
P Sreenivasulu Reddy
8/2/2019 C Language Main Topics
2/6
INDEX
Introduction
First Program
Constants , Variables & Data types
Loops
Control Structure
Functions
Pointers
Arrays
Strings Structures & Unions
File Handling Concepts
Graphics.
8/2/2019 C Language Main Topics
3/6
INTRODUCTION
C was developed by Dennis Ritchie at Bell Laboratories in 1972. Most of its principles and ideas were taken from the earlier language B, BCPL
and CPL.
CPL was developed jointly between the Mathematical Laboratory at the
University of Cambridge and the University of London Computer Unit in 1960s.
CPL (Combined Programming Language) was developed with the purpose of
creating a language that was capable of both machine independent programmingand would allow the programmer to control the behavior of individual bits of
information. But the CPL was too large for use in many applications.
In 1967, BCPL (Basic Combined Programming Language) was created as a scaled
down version of CPL while still retaining its basic features. This process was
continued by Ken Thompson. He made B Language during working at Bell Labs.
B Language was a scaled down version of BCPL. B Language was written for thesystems programming. In 1972, a co-worker of Ken Thompson, Dennis Ritchie
developed C Language by taking some of the generality found in BCPL to the B
language.
8/2/2019 C Language Main Topics
4/6
First Project done used by C-Language :
The original PDP-11 version of the Unix system was developed in assembly
language. In 1973, C language had become powerful enough that most of the Unix
kernel was rewritten in C. This was one of the first operating system kernels
implemented in a language other than assembly.
8/2/2019 C Language Main Topics
5/6
FIRSTPROGRAM
C Language is a case sensitive language.
Program Structure:This section consist of set
of comment lines.
This section consist
of set of Header
files and Constant
values
The variables are declared
before the main ( ) function as
well as user defined functions
are called global variables.
The variable declaration is a part of C
program and all the variables are used
in main ( ) function should be declared
in the local declaration section is called
local variables.
These statements are building
blocks of a program. They represent
instructions to the computer to
perform a specific task (operations).
These are subprograms, generally, a
subprogram is a function and these
functions are written by the user are
called user ; defined functions.
8/2/2019 C Language Main Topics
6/6
CONSTANTS, VARIABLES & DATA TYPES
C constants : The alphabets, numbers and special symbols when properly
combined form constants, variables and keywords. A constant is an entity that does notchange.
Ex: Pie=3.14;
o Variables : A variable is an entity that may change it value. In any program wetypically do lots of calculations.
Types of Variables
There are two main types of variables in C: numeric variables that hold onlynumbers or values, and string variables that hold text, from one to severalcharacters long.
Ex: var a=Shubh soft Solutions ;
var b=5;
Keywords :A keyword is a word that is part of C Language itself. Thesewords have predefined meanings and these words cannot be used as variable
names.