SlideShare a Scribd company logo
OVERVIEW OF C
by
C.CHANDRAPRIYA, M.sc
FATHER OF ‘C’ LANGUAGE
INTRODUCTION
• C is one of the most popular computer languages today.
• C language has evolved from three different structured language ALGOL, BCPL and
B language.
• C was an offspring of the ‘Basic Combined Programming Language’(BCPL) called
B language, developed at Cambridge University in 1960.
• B language invented by Ken Thompson developed by Martin Richards.
• B language was modified by Dennis Ritchie at AT & T’s Bell laboratories in 1972.
• The new language was named C.
• C adopted by ‘American National Standard Institute’(ANSI).
• In 1990, a version of C language was approved by the ‘International Standard
Organisation’(ISO) and that version of C is also referred to as C89 and C99.
KEN THOMPSON DENNIS RITCHIE
HISTORY OF C
Year Developed by
1960 International Group
1967 Martin Richard
1970 Ken Thompson
1973 Dennis Ritchie
1989 ANSI Committee
1990 ISO Committee
ALGOL
BCPL
B
Traditional C
ANSI CIS C
ANSI/ISO C
FEATURES OF C
• C has been written in assembly language.
• C is a high-level structured oriented programming language.
• C is a robust language with rich set of built-in function and operators.
• Programs written in C are efficient and fast.
• C is highly portable, programs once written in C can be run on another machines
with minor or no modification.
• C is basically a collection of C library functions, we can also create our own
function and add it to the C library.
• C is easily extensible.
BEST OF C
• One of the early programming languages.
• Still the best programming language to learn quickly.
• C language is reliable, simple and easy to use.
• C language is a structured language.
• Modern programming concepts are based on C.
• It can be compiled on a variety of computer platforms.
• Universities preferred to add C programming in their courseware.
• C program can be viewed as a group of building blocked called function.
APPLICATIONS
C language has widely uses, some main uses are given below.
• Used to develop software's that control embedded systems. Examples of some
embedded system are Washing machine, Microwave oven, etc.
• For creating computer applications.
• UNIX Operating System is developed in C language.
BASIC STRUCTURE OF C PROGRAM
More section
Documentation Section
link Section
Definition Section
Global Declaration Secation
{
Declaration Part
Executable Part
}
Subprogram Section
Function 1
Function 2 ( User – defined
. Function)
.
Function n
EXAMPLE
#include<studio.h> / link section /
int total=0; / Global declaration and definition section /
int sum(int,int); / Function declaration section /
int main() / main function /
{
printf(“ this is a C programn”);
total=sum(1,1);
printf(“sum of two numbers:%dn”, total);
return 0;
}
int sum(int a, int b) / User defined function /
{ / Definition section /
return a+b;
}
DESCRIPTION FOR EACH SECTION
Documentation Section:
we can give comment about the program, create or modified
date, author name etc.
The character or words or anything which are given between
“/*” and “*/”, won’t be considered by C compiler for compilation process.
There will be ignored by C compiler during compilation.
Link Section:
The link section consists of the header files of the functions that
are used in the program.
It provides instructions to the compiler to link functions from the
system library.
CONT.…
Definition Section:
All the symbolic constants are written in definition section. Macros
are know as symbolic constants.
Global Declaration Section:
The global variables that can be used anywhere in the program are
declared in global declaration section.
This section also declares the user defined functions.
FUNCTION PROTOTYPE DECLARATION SECTION:
Function prototype give many information about a function like
return type, parameter names used inside the function
CONT.….
main() Function section:
Every C program is started from main function and this function
contain two major sections called
Declaration Section and
Executable Section.
Declaration section declares all the variables that are used in executable part.
User Defined Function Section:
User can define their own function in this section which perform
particular task as per the user requirement.
EXECUTING A “C” PROGRAM
Executing a program written in C involves a series of step.
There are:
Creating the Program.
Compiling the program.
Linking the program with function that are needed from the C library.
Executing the program.
PROCESS OF COMPILING AND RUNNING A C PROGRAM
COMPILER
Definition of compiler:
A Compiler is computer software that translate source code into
object code.
CONT.…
Compiler takes high level human readable program as input and
convert it into the lower level code.
This conversion takes place using different phases.
Different phases of compilers:
Analysis phase
Synthesis phase
ANALYSIS PHASE:
Analysis phase contain
Lexical analysis
Syntax analysis
Semantic analysis
LEXICAL ANALYSIS:
Task of lexical analysis is to read the input characters and produce
as output a sequence of Tokens that the parser user for syntax analysis.
Token
Source Lexical Parser
Program analyser
Get next
token
symbol
table
Lexical Analyser is First Phase of compiler.
Input to lexical analyser is “Source Code”.
CONT.….
Lexical analysis identifies different Lexical units in a Source code.
Different Lexical classes or Tokens or Lexemes.
Identifiers
Constants
Keywords
Operators
Lexical analyzer is also called “Linear Phase” or “Linear Analysis” or
“Scanning”.
Individual Token is also called Lexeme.
Lexical analyzer’s output is given to Syntax analysis.
SYNTAX ANALYSIS
• It is Second phases of compiler after Lexical Analyzer.
• It is also called as Hierarchical Analysis or Parsing.
• It Groups Tokens of source program into Grammatical Production.
• In short Syntax analysis generates Parse tree.
SYNTAX ANALYSIS: PARSE TREE
x = a + b;
It this statement syntax analyzer will create a parse tree from the
Tokens.
Assignment statement
=
Identifier Expression
x +
Identifier Identifier
a b
PARSE TREE: EXPLANATION
Syntax analyzer will check only Syntax not the meaning of
Statement.
explanation:
Addition operator plus (‘+’) operator on the two operands.
Syntax analyzer will just check whether plus operator has two
operands or not.
It does not checks the type of operands.
SEMANTIC ANALYSIS
Semantic analysis is the third phase of compiler.
Data type of Fist operand
Data type of Second operand
Check whether + is binary or unary
Check for number of operands supplied to operator supplied
to Operator Depending on type of operator (Unary / Binary / Ternary)
SOME BASIC SYNTAX RULE FOR C PROGRAM
• C is a case sensitive language so all C instruction must be written in lower case
letter.
• All C statement must be end with a semicolon.
• Whitespace is used in C describe blanks and tabs.
• Whitespace is required between keywords and identifiers.
SAMPLE C PROGRAM
#include<studio.h>
main( )
{
printf(“hi slide share”);
}
output:
hi slide share
PROGRAM EXPLANATION
Header File:
standard input and output (predefined)
#include<studio.h>
pre-processor directive
The pre-processor is a software program that will expand the source code while the program
is compiled.
pre-defined is used to display the results on the standard output.
Syntax:
#include<path-space>
< > angle-bracket form, pre-processor to search the directories that are specified by the
include.
CONT.….
main( )
This is the point where the execution begins when the program is run.
main( ) is the calling and also user-defined function.
{ } – name of parentheses (the two brackets properly called Braces).
This indication to the compiler that this is a function.
“ ” – The end result is that whatever is included between the Quotation marks
will be displayed on the monitor when the program is run.
CONT.….
; (semi-colon) – used as a statement Terminator.
so is required as a signal to the compiler that this line is complete.
printf (executable statement) – is the predefined, standard C function for printing
output.
n (new line character) – C compiler consider the combination of the(black lash)
and (letter n) as a one character. So it return the cursor to
the left side of the monitor and print the new line.
ADVANTAGES
• C is the building block for many other programming languages.
• Programs written in C are highly portable languages.
• Several standard functions are the (like in-built) that can be used to develop
programs.
• C program are basically collections of C library function, and it’s also easy to add
own function in to the C library.
• The modular structure make code debugging, maintenance and testing easier.
DISADVANTAGES
• C does not provide Object Oriented Programming(OOP) concepts.
• There is no runtime checking in C language.
• There is no strict type checking.
Example, we can pass on integer value.
• There is no concepts of Namespace in C.
• C does not provided binding or wrapping up of data in a single unit.
• C does not provide Constructor and Destructor.
Overview of c
Overview of c
Overview of c

More Related Content

What's hot

introduction to C programming (C)
introduction to C programming (C)introduction to C programming (C)
introduction to C programming (C)
Abhishek Walia
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
JEENA SARA VIJU
 
C programming language
C programming languageC programming language
C programming language
Maha lakshmi
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
Manoj Tyagi
 
Notes of c programming 1st unit BCA I SEM
Notes of c programming  1st unit BCA I SEMNotes of c programming  1st unit BCA I SEM
Notes of c programming 1st unit BCA I SEM
Mansi Tyagi
 
C Language
C LanguageC Language
C Language
Aakash Singh
 
introduction to c language
 introduction to c language introduction to c language
introduction to c language
Rai University
 
An Overview of Programming C
An Overview of Programming CAn Overview of Programming C
An Overview of Programming C
Nishargo Nigar
 
C language
C languageC language
C language
marar hina
 
COM1407: Introduction to C Programming
COM1407: Introduction to C Programming COM1407: Introduction to C Programming
COM1407: Introduction to C Programming
Hemantha Kulathilake
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
MOHAMAD NOH AHMAD
 
C basics
C   basicsC   basics
Learning the C Language
Learning the C LanguageLearning the C Language
Learning the C Language
nTier Custom Solutions
 
Tokens_C
Tokens_CTokens_C
Tokens_C
Prabhu Govind
 
C basics 4 std11(GujBoard)
C basics 4 std11(GujBoard)C basics 4 std11(GujBoard)
C basics 4 std11(GujBoard)indrasir
 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programming
Rokonuzzaman Rony
 
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTTC programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
Batra Centre
 

What's hot (20)

introduction to C programming (C)
introduction to C programming (C)introduction to C programming (C)
introduction to C programming (C)
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
 
C programming language
C programming languageC programming language
C programming language
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Notes of c programming 1st unit BCA I SEM
Notes of c programming  1st unit BCA I SEMNotes of c programming  1st unit BCA I SEM
Notes of c programming 1st unit BCA I SEM
 
C Language
C LanguageC Language
C Language
 
introduction to c language
 introduction to c language introduction to c language
introduction to c language
 
An Overview of Programming C
An Overview of Programming CAn Overview of Programming C
An Overview of Programming C
 
C language
C languageC language
C language
 
COM1407: Introduction to C Programming
COM1407: Introduction to C Programming COM1407: Introduction to C Programming
COM1407: Introduction to C Programming
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
C basics
C   basicsC   basics
C basics
 
Learning the C Language
Learning the C LanguageLearning the C Language
Learning the C Language
 
Unit4
Unit4Unit4
Unit4
 
Tokens_C
Tokens_CTokens_C
Tokens_C
 
C basics 4 std11(GujBoard)
C basics 4 std11(GujBoard)C basics 4 std11(GujBoard)
C basics 4 std11(GujBoard)
 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programming
 
C programming part1
C programming part1C programming part1
C programming part1
 
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTTC programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
 
C languaGE UNIT-1
C languaGE UNIT-1C languaGE UNIT-1
C languaGE UNIT-1
 

Similar to Overview of c

chapter 1.pptx
chapter 1.pptxchapter 1.pptx
chapter 1.pptx
SeethaDinesh
 
C programming
C programmingC programming
C programming
preetikapri1
 
C session 1.pptx
C session 1.pptxC session 1.pptx
C session 1.pptx
NIRMALRAJSCSE20
 
C lecture notes new
C lecture notes newC lecture notes new
C lecture notes new
Kuntal Bhowmick
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
Subramanyambharathis
 
Introduction to C Unit 1
Introduction to C Unit 1Introduction to C Unit 1
Introduction to C Unit 1
SURBHI SAROHA
 
Intro to cprogramming
Intro to cprogrammingIntro to cprogramming
Intro to cprogramming
skashwin98
 
2.Overview of C language.pptx
2.Overview of C language.pptx2.Overview of C language.pptx
2.Overview of C language.pptx
Vishwas459764
 
C Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYC Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYRajeshkumar Reddy
 
67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf
Rajb54
 
Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)
Nuzhat Memon
 
Unit-2.pptx
Unit-2.pptxUnit-2.pptx
Unit-2.pptx
sidhantkulkarni1
 
Learn c language Important topics ( Easy & Logical, & smart way of learning)
Learn c language Important topics ( Easy & Logical, & smart way of learning)Learn c language Important topics ( Easy & Logical, & smart way of learning)
Learn c language Important topics ( Easy & Logical, & smart way of learning)
Rohit Singh
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
Mugilvannan11
 
Overview of C Mrs Sowmya Jyothi
Overview of C Mrs Sowmya JyothiOverview of C Mrs Sowmya Jyothi
Overview of C Mrs Sowmya Jyothi
Sowmya Jyothi
 
C programming
C programmingC programming
C programming
Jigarthacker
 
Basic c
Basic cBasic c
Basic c
Veera Karthi
 
CS3251-_PIC
CS3251-_PICCS3251-_PIC
The C++ Programming Language
The C++ Programming LanguageThe C++ Programming Language
The C++ Programming Language
Prof Ansari
 

Similar to Overview of c (20)

chapter 1.pptx
chapter 1.pptxchapter 1.pptx
chapter 1.pptx
 
C programming
C programmingC programming
C programming
 
C session 1.pptx
C session 1.pptxC session 1.pptx
C session 1.pptx
 
C lecture notes new
C lecture notes newC lecture notes new
C lecture notes new
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
 
Introduction to C Unit 1
Introduction to C Unit 1Introduction to C Unit 1
Introduction to C Unit 1
 
OVERVIEW OF ‘C’ PROGRAM
OVERVIEW OF ‘C’ PROGRAMOVERVIEW OF ‘C’ PROGRAM
OVERVIEW OF ‘C’ PROGRAM
 
Intro to cprogramming
Intro to cprogrammingIntro to cprogramming
Intro to cprogramming
 
2.Overview of C language.pptx
2.Overview of C language.pptx2.Overview of C language.pptx
2.Overview of C language.pptx
 
C Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYC Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDY
 
67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf
 
Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)
 
Unit-2.pptx
Unit-2.pptxUnit-2.pptx
Unit-2.pptx
 
Learn c language Important topics ( Easy & Logical, & smart way of learning)
Learn c language Important topics ( Easy & Logical, & smart way of learning)Learn c language Important topics ( Easy & Logical, & smart way of learning)
Learn c language Important topics ( Easy & Logical, & smart way of learning)
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
 
Overview of C Mrs Sowmya Jyothi
Overview of C Mrs Sowmya JyothiOverview of C Mrs Sowmya Jyothi
Overview of C Mrs Sowmya Jyothi
 
C programming
C programmingC programming
C programming
 
Basic c
Basic cBasic c
Basic c
 
CS3251-_PIC
CS3251-_PICCS3251-_PIC
CS3251-_PIC
 
The C++ Programming Language
The C++ Programming LanguageThe C++ Programming Language
The C++ Programming Language
 

More from Chandrapriya Rediex

5-Unit (CAB).pdf
5-Unit (CAB).pdf5-Unit (CAB).pdf
5-Unit (CAB).pdf
Chandrapriya Rediex
 
unit-4 (CAB).pdf
unit-4 (CAB).pdfunit-4 (CAB).pdf
unit-4 (CAB).pdf
Chandrapriya Rediex
 
CAB - Unit-2.pdf
CAB - Unit-2.pdfCAB - Unit-2.pdf
CAB - Unit-2.pdf
Chandrapriya Rediex
 
CAB unit-1.pdf
CAB unit-1.pdfCAB unit-1.pdf
CAB unit-1.pdf
Chandrapriya Rediex
 
Evolauion of computer converted
Evolauion of computer convertedEvolauion of computer converted
Evolauion of computer converted
Chandrapriya Rediex
 
Enhanced adaptive security system for SMS – based One Time Password
Enhanced adaptive security system for SMS – based One Time Password Enhanced adaptive security system for SMS – based One Time Password
Enhanced adaptive security system for SMS – based One Time Password
Chandrapriya Rediex
 
Enhanced adaptive security system for SMS – based One Time Password
Enhanced adaptive security system for SMS – based One Time PasswordEnhanced adaptive security system for SMS – based One Time Password
Enhanced adaptive security system for SMS – based One Time Password
Chandrapriya Rediex
 
Character set of c
Character set of cCharacter set of c
Character set of c
Chandrapriya Rediex
 

More from Chandrapriya Rediex (8)

5-Unit (CAB).pdf
5-Unit (CAB).pdf5-Unit (CAB).pdf
5-Unit (CAB).pdf
 
unit-4 (CAB).pdf
unit-4 (CAB).pdfunit-4 (CAB).pdf
unit-4 (CAB).pdf
 
CAB - Unit-2.pdf
CAB - Unit-2.pdfCAB - Unit-2.pdf
CAB - Unit-2.pdf
 
CAB unit-1.pdf
CAB unit-1.pdfCAB unit-1.pdf
CAB unit-1.pdf
 
Evolauion of computer converted
Evolauion of computer convertedEvolauion of computer converted
Evolauion of computer converted
 
Enhanced adaptive security system for SMS – based One Time Password
Enhanced adaptive security system for SMS – based One Time Password Enhanced adaptive security system for SMS – based One Time Password
Enhanced adaptive security system for SMS – based One Time Password
 
Enhanced adaptive security system for SMS – based One Time Password
Enhanced adaptive security system for SMS – based One Time PasswordEnhanced adaptive security system for SMS – based One Time Password
Enhanced adaptive security system for SMS – based One Time Password
 
Character set of c
Character set of cCharacter set of c
Character set of c
 

Recently uploaded

1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 

Recently uploaded (20)

1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 

Overview of c

  • 2. FATHER OF ‘C’ LANGUAGE
  • 3. INTRODUCTION • C is one of the most popular computer languages today. • C language has evolved from three different structured language ALGOL, BCPL and B language. • C was an offspring of the ‘Basic Combined Programming Language’(BCPL) called B language, developed at Cambridge University in 1960. • B language invented by Ken Thompson developed by Martin Richards. • B language was modified by Dennis Ritchie at AT & T’s Bell laboratories in 1972. • The new language was named C. • C adopted by ‘American National Standard Institute’(ANSI). • In 1990, a version of C language was approved by the ‘International Standard Organisation’(ISO) and that version of C is also referred to as C89 and C99.
  • 5. HISTORY OF C Year Developed by 1960 International Group 1967 Martin Richard 1970 Ken Thompson 1973 Dennis Ritchie 1989 ANSI Committee 1990 ISO Committee ALGOL BCPL B Traditional C ANSI CIS C ANSI/ISO C
  • 6. FEATURES OF C • C has been written in assembly language. • C is a high-level structured oriented programming language. • C is a robust language with rich set of built-in function and operators. • Programs written in C are efficient and fast. • C is highly portable, programs once written in C can be run on another machines with minor or no modification. • C is basically a collection of C library functions, we can also create our own function and add it to the C library. • C is easily extensible.
  • 7. BEST OF C • One of the early programming languages. • Still the best programming language to learn quickly. • C language is reliable, simple and easy to use. • C language is a structured language. • Modern programming concepts are based on C. • It can be compiled on a variety of computer platforms. • Universities preferred to add C programming in their courseware. • C program can be viewed as a group of building blocked called function.
  • 8. APPLICATIONS C language has widely uses, some main uses are given below. • Used to develop software's that control embedded systems. Examples of some embedded system are Washing machine, Microwave oven, etc. • For creating computer applications. • UNIX Operating System is developed in C language.
  • 9. BASIC STRUCTURE OF C PROGRAM More section Documentation Section link Section Definition Section Global Declaration Secation { Declaration Part Executable Part } Subprogram Section Function 1 Function 2 ( User – defined . Function) . Function n
  • 10. EXAMPLE #include<studio.h> / link section / int total=0; / Global declaration and definition section / int sum(int,int); / Function declaration section / int main() / main function / { printf(“ this is a C programn”); total=sum(1,1); printf(“sum of two numbers:%dn”, total); return 0; } int sum(int a, int b) / User defined function / { / Definition section / return a+b; }
  • 11. DESCRIPTION FOR EACH SECTION Documentation Section: we can give comment about the program, create or modified date, author name etc. The character or words or anything which are given between “/*” and “*/”, won’t be considered by C compiler for compilation process. There will be ignored by C compiler during compilation. Link Section: The link section consists of the header files of the functions that are used in the program. It provides instructions to the compiler to link functions from the system library.
  • 12. CONT.… Definition Section: All the symbolic constants are written in definition section. Macros are know as symbolic constants. Global Declaration Section: The global variables that can be used anywhere in the program are declared in global declaration section. This section also declares the user defined functions. FUNCTION PROTOTYPE DECLARATION SECTION: Function prototype give many information about a function like return type, parameter names used inside the function
  • 13. CONT.…. main() Function section: Every C program is started from main function and this function contain two major sections called Declaration Section and Executable Section. Declaration section declares all the variables that are used in executable part. User Defined Function Section: User can define their own function in this section which perform particular task as per the user requirement.
  • 14. EXECUTING A “C” PROGRAM Executing a program written in C involves a series of step. There are: Creating the Program. Compiling the program. Linking the program with function that are needed from the C library. Executing the program.
  • 15. PROCESS OF COMPILING AND RUNNING A C PROGRAM
  • 16. COMPILER Definition of compiler: A Compiler is computer software that translate source code into object code.
  • 17. CONT.… Compiler takes high level human readable program as input and convert it into the lower level code. This conversion takes place using different phases. Different phases of compilers: Analysis phase Synthesis phase
  • 18. ANALYSIS PHASE: Analysis phase contain Lexical analysis Syntax analysis Semantic analysis
  • 19. LEXICAL ANALYSIS: Task of lexical analysis is to read the input characters and produce as output a sequence of Tokens that the parser user for syntax analysis. Token Source Lexical Parser Program analyser Get next token symbol table Lexical Analyser is First Phase of compiler. Input to lexical analyser is “Source Code”.
  • 20. CONT.…. Lexical analysis identifies different Lexical units in a Source code. Different Lexical classes or Tokens or Lexemes. Identifiers Constants Keywords Operators Lexical analyzer is also called “Linear Phase” or “Linear Analysis” or “Scanning”. Individual Token is also called Lexeme. Lexical analyzer’s output is given to Syntax analysis.
  • 21. SYNTAX ANALYSIS • It is Second phases of compiler after Lexical Analyzer. • It is also called as Hierarchical Analysis or Parsing. • It Groups Tokens of source program into Grammatical Production. • In short Syntax analysis generates Parse tree.
  • 22. SYNTAX ANALYSIS: PARSE TREE x = a + b; It this statement syntax analyzer will create a parse tree from the Tokens. Assignment statement = Identifier Expression x + Identifier Identifier a b
  • 23. PARSE TREE: EXPLANATION Syntax analyzer will check only Syntax not the meaning of Statement. explanation: Addition operator plus (‘+’) operator on the two operands. Syntax analyzer will just check whether plus operator has two operands or not. It does not checks the type of operands.
  • 24. SEMANTIC ANALYSIS Semantic analysis is the third phase of compiler. Data type of Fist operand Data type of Second operand Check whether + is binary or unary Check for number of operands supplied to operator supplied to Operator Depending on type of operator (Unary / Binary / Ternary)
  • 25. SOME BASIC SYNTAX RULE FOR C PROGRAM • C is a case sensitive language so all C instruction must be written in lower case letter. • All C statement must be end with a semicolon. • Whitespace is used in C describe blanks and tabs. • Whitespace is required between keywords and identifiers.
  • 26. SAMPLE C PROGRAM #include<studio.h> main( ) { printf(“hi slide share”); } output: hi slide share
  • 27. PROGRAM EXPLANATION Header File: standard input and output (predefined) #include<studio.h> pre-processor directive The pre-processor is a software program that will expand the source code while the program is compiled. pre-defined is used to display the results on the standard output. Syntax: #include<path-space> < > angle-bracket form, pre-processor to search the directories that are specified by the include.
  • 28. CONT.…. main( ) This is the point where the execution begins when the program is run. main( ) is the calling and also user-defined function. { } – name of parentheses (the two brackets properly called Braces). This indication to the compiler that this is a function. “ ” – The end result is that whatever is included between the Quotation marks will be displayed on the monitor when the program is run.
  • 29. CONT.…. ; (semi-colon) – used as a statement Terminator. so is required as a signal to the compiler that this line is complete. printf (executable statement) – is the predefined, standard C function for printing output. n (new line character) – C compiler consider the combination of the(black lash) and (letter n) as a one character. So it return the cursor to the left side of the monitor and print the new line.
  • 30. ADVANTAGES • C is the building block for many other programming languages. • Programs written in C are highly portable languages. • Several standard functions are the (like in-built) that can be used to develop programs. • C program are basically collections of C library function, and it’s also easy to add own function in to the C library. • The modular structure make code debugging, maintenance and testing easier.
  • 31. DISADVANTAGES • C does not provide Object Oriented Programming(OOP) concepts. • There is no runtime checking in C language. • There is no strict type checking. Example, we can pass on integer value. • There is no concepts of Namespace in C. • C does not provided binding or wrapping up of data in a single unit. • C does not provide Constructor and Destructor.