1. C U T E
C Language
program
T H E P O W E R P O I N T T E M P L A T E
Mrs.G.Jyothi M.C.A.,M.B.A.,
A s s t . P r o f e s s o r
Depa rtme nt o f C o m merce
E.M.G.Yadava Women's College
4. Over view of C
Basic structure of c
programs
Executing a c
programs
Constants And
variables
Data Types
Character set,C Tokens,
keywords and identifiers
Declaration of variables,
Assigning value to variables
Defining symbolic
constants
5. What is C
C is a programming language developed at AT & T's
BELL Laboratories of USA in 1972
It was designed and written by a man named Dennis
Ritchie .Late seventies C began to replace more familiar
language like PL/I ,ALGOL.,Etc. C to older language like
FORTRAN or PL/L ,Newer ones like Pascal and APL.
6. Dennis Ritchie pioneer of C
programming language and
spearheaded the
development of Unix ,has
died at age 70
Ritchie's illustrious career
begin in 1967, when he
joined BELL Labs just 1year
before receiving a PhD in
physics from Harvard
University
7. In 1969, he helped to develop the Unix
Operating
In 1978 C programming language and
Award in 1983, Election to the National
of Engineering in 1988 and the
National medal of Technology in1999
8. Getting Started with C
There is a close analogy between learning
English language and learning C Language
Learning C is similar and easier. We must first
know what alphabet, numbers and special
symbols are used in C , then how using them
constants, variables and keywords are
constructed.
9. Steps in Learning C
Alphabets
Digits
Special symbols
Instructions Program
Constants
Variables
Keywords
10. History Of ANSI C(American National Standards Institute)
ALGOL
BCPL
B
1960
1967
1970
International
Groups
Martin
Richards
Ken
Thompson
11. Traditional C
K&R C
ANSI C
ANSI/SO C
Kernighan &
Ritchie
1972
1978
1989
1990
Dennis Ritchie
ANSI Committee
ISO Committee
12. Importance Of C
The C complier combines the capabilities of an assembly language
with the features of a high-level language and therefore suited for
writing both system software and business packages.
Programs written in C are efficient and fast.This is due to its variety
of DataTypes and powerful operators and many times faster than
BASIC
C is highly portable and it is well suited for structured programming
,thus requiring the user to think of a problem in terms of function
modules or blocks
13. A proper collection of these modules would make a complete
program and each modules structure makes program debugging,
testing and maintenance easier.
Another important features of C is it's ability to extend itself.
A C program is basically a collection of functions that are supported
by the C library.
Several standard functions are available which can be used for
developing programs
There are only 32 keywords and it's strength lies in it's built-in
functions
For EX: A program to increment a variable from 0 to 15000 takes
about one second in a C while it takes more than 50 seconds in an
interpreter BASIC.
14. SAMPLE PROGRAM : PRINTING A MESSAGE
Main()
{
/*------- Printing begins----------*/
Printf(" I see, I remember");
/*---------printing ends-------------*/
}
Output: I see,I remember
15. BASIC STRUCTURE OF C PROGRAMS
C program can be viewed as a group of building blocks called function
A function is a subroutine that may include one or more statement designed to
perform a specific task.
To write a C program, we first create functions and then put them together
A C program may contain one or more sections.
16. An overview of a C program
Documentation Section
Link Section
Definition Section
Global Declaration Section
main() Function Section
{
}
Declaration Part
Executable Part
18. PROGRAMMING OF STYLE AND THE MAIN Fn
C is a free- form language and statement are written in
lowercase letters . Uppercase letters are used only for
symbolic constants.
We can group statement together on one line
a= b;
x=y+1;
z=a+x;
Can be written on one line as
19. a=b; x=y+1; z= a+x;
The main is a part of every C program. C permit
different forms of main statement. Following forms are
allowed.
main()
int main ()
void main()
main (void)
void main (void)
int main (void)
20. EXECUTING A C PROGRAM
Executing a program written in C involves a series of
steps. These are:
Creating the program
Compiling the program
Linking the program with function that are needed
from the C library
Executing the program.
21. CHARACTER SET
The character that can be used to form words,
numbers and expressions depends upon the
computer on which the program is run.
The character in C are grouped into the following
categories:
1. Letters
2. Digits
3. Special characters
4. White spaces
22. C character set
Special characters
, comma
. period
; Semicolon
:Colon
? question mark
'apostrophe
"quotation mark
$ dollar sign
% percent sign
& ampersand
^caret
*asterisk
- minus sign
+ Plus sign
( left parenthesis
) right parenthesis
{ left brace
} right brace
27. ADD YOUR TITLE HERE
ADD TITLE
According to your need to draw the
text box size
According to your need to draw the
text box size
According to your need to draw the
text box size