SlideShare a Scribd company logo
1 of 18
1
Let Us
2
First Step to the 21st
Century
Literacy : Programming
First Step to the 21st
Century
Literacy : Programming
Introduction to C
 The C programming language was designed or invented by
Dennis Ritchie at Bell Laboratories in the early 1970s
 Influenced by
 ALGOL 60 (1960),
 CPL (Cambridge, 1963),
 BCPL (Martin Richard, 1967),
 B (Ken Thompson, 1970)
 Traditional C:
 The C Programming Language, by Brian Kernighan and
Dennis Ritchie, 2nd
Edition, Prentice Hall
 Referred to as K&R
 Standardized in 1989 by ANSI (American National Standards
Institute) known as ANSI C
3
4
The Father of C Programming
and UNIX
The Father of C Programming
and UNIX
Introduction to C
 C is a Middle-level language: suitable language for systems
programming
 It is a procedural or sequential language
 C is also called ELL or English like language
 C is easy to learn or understand
 It is a case sensitive language
 C is a small language: relies on a “library” of standard functions
 C is highly portable: means that c programs written for one
computer can be run on other computer with no modification.
 C is a permissive language: it assumes that you know what
you’re doing, so it allows you a wider degree of latitude than
many languages. It doesn’t mandate the detailed error-checking
found in other language
5
Strength of C
1. Portability: means that c programs written for one computer
can be run on other computer with no modification.
2. Robustness: it is a robust language which is rich in built in
functions and operators.
3. Easy to understand: it is called ELL as almost all the structures
are very much similar to English language.
4. Efficiency: intended for applications where assembly language
had traditionally been used.
5. Power: large collection of data types and operators
6. Flexibility: not only for system but also for embedded system
commercial data processing
7. Programs written in C is fast and efficient
8. Standard library
9. Integration with UNIX 6
Weakness of C
1. error-prone
2. Difficult to modify
3. Difficult to debug
4. It is difficult to write large codes or solve complex
problems in C
7
Basic Structure of C Programs
1. Documentation Section
2. Link section
3. Definition Section
4. Global Declaration Section
5. Main Function( )
{
1. Declaration part
2. Executable part
}
6. Subprogram section
User defined functions are build here
8
Basic Structure of C
1. Documentation section: it consists of a set of comment lines
giving the name of the program, the author, the purpose of the
program and how the program works. The intention is to
provide with some documentation or information so that the
program can be used or analyzed later.
2. Link section: it provides instruction to the compiler to link
functions from the system library.
3. Definition section: definition of all the symbolic constants are
goes here. (if any symbolic constants are used in the program)
4. Global declaration: global variables are declared here. The user
defined functions also can be declared here. (if any global
variables are used in the program)
9
Basic Structure of C
5. Main function section: every C program must have one main
function. This section contains two parts: declaration part and
executable part. These two parts must appear in between the
opening and closing curly braces. The declaration part
declares all the variables that are going to be used in the
executable part. The executable part contains the main
programming logical statements or algorithm statements.
The executable must contain at least one statement. All the
statements in the declaration and executable parts must end
with a semicolon (;). This section is the logical end of the
program.
6. Subprogram section: if necessary then user defined functions
are defined here or created here.(if user defined functions are
used)
10
Need to understand
 Concept of definition and declaration
 Declaration: it tells or declares the identity or type of
something. Like Rahim is a boy. It means Rahim is here
declared as a boy.
 Definition: it tells or defines the specific type. Like in
definition section we will define or describe what are the
characteristics of a boy or how the boy works.
11
Need to understand
 ( ) – is called the parenthesis
 { } – is called the curly braces
 [ ] – is called the bracket
 Parenthesis is used to denote a function
 Curly braces is used to create a body
 Every statement in C ends with a semicolon
12
A Simple C Program
/* This is the sample program to print a
message hello world. This is done by
course teacher */
#include <stdio.h>
#include <conio.h>
main ( )
{
clrscr();
printf(“Hello Worldn”);
getch();
} 13
How a C program is Executed ?
 A C program is executed in three phases:
1. Creating Source Code file
[ Empty file(input) Source Code File(output) ]
2. Compiling
[ Source Code File(input) Object File(output) ]
3. Linking
[ Object File(input) Executable File(output) ]
14
How a C program is Executed ?
Creating Source
Code
Creating Source
Code
Compiling
Source Code
Compiling
Source Code
Linking Object
File
Linking Object
File
[ Source Code
File .c ]
[ Object File .obj ]
[ Executable File
.exe ]
[ Empty File ]
15
Step by step
procedure how a C
program is
executed
Step by step
procedure how a C
program is
executed
16
How a C program
is executed
?
How a C program
is executed
?
17
18
Md. Shakhawat Hossain
Student of Department of Computer Science &
Engineering
University of Rajshahi
E-mail: mshimul86@gmail.com

More Related Content

What's hot

C basics 4 std11(GujBoard)
C basics 4 std11(GujBoard)C basics 4 std11(GujBoard)
C basics 4 std11(GujBoard)indrasir
 
C programming notes.pdf
C programming notes.pdfC programming notes.pdf
C programming notes.pdfAdiseshaK
 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointJavaTpoint.Com
 
C presentation book
C presentation bookC presentation book
C presentation bookkrunal1210
 
Introduction to C Programming - I
Introduction to C Programming - I Introduction to C Programming - I
Introduction to C Programming - I vampugani
 
C programming language tutorial
C programming language tutorial C programming language tutorial
C programming language tutorial javaTpoint s
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++Ankur Pandey
 
Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming LanguageAhmad Idrees
 
Input Output Management In C Programming
Input Output Management In C ProgrammingInput Output Management In C Programming
Input Output Management In C ProgrammingKamal Acharya
 
Features of c language 1
Features of c language 1Features of c language 1
Features of c language 1srmohan06
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programmingManoj Tyagi
 
How to execute a C program
How to execute a C  program How to execute a C  program
How to execute a C program Leela Koneru
 
3 data-types-in-c
3 data-types-in-c3 data-types-in-c
3 data-types-in-cteach4uin
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C ProgrammingMOHAMAD NOH AHMAD
 
Presentation on generation of languages
Presentation on generation of languagesPresentation on generation of languages
Presentation on generation of languagesRicha Pant
 

What's hot (20)

C basics 4 std11(GujBoard)
C basics 4 std11(GujBoard)C basics 4 std11(GujBoard)
C basics 4 std11(GujBoard)
 
C programming notes.pdf
C programming notes.pdfC programming notes.pdf
C programming notes.pdf
 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpoint
 
C presentation book
C presentation bookC presentation book
C presentation book
 
CS3251-_PIC
CS3251-_PICCS3251-_PIC
CS3251-_PIC
 
Introduction to C Programming - I
Introduction to C Programming - I Introduction to C Programming - I
Introduction to C Programming - I
 
C programming language tutorial
C programming language tutorial C programming language tutorial
C programming language tutorial
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming Language
 
C#.NET
C#.NETC#.NET
C#.NET
 
Input Output Management In C Programming
Input Output Management In C ProgrammingInput Output Management In C Programming
Input Output Management In C Programming
 
Features of c language 1
Features of c language 1Features of c language 1
Features of c language 1
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
How to execute a C program
How to execute a C  program How to execute a C  program
How to execute a C program
 
Introduction to c++ ppt
Introduction to c++ pptIntroduction to c++ ppt
Introduction to c++ ppt
 
3 data-types-in-c
3 data-types-in-c3 data-types-in-c
3 data-types-in-c
 
C fundamental
C fundamentalC fundamental
C fundamental
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
Presentation on generation of languages
Presentation on generation of languagesPresentation on generation of languages
Presentation on generation of languages
 

Viewers also liked

INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGAbhishek Dwivedi
 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programmingavikdhupar
 
Introduction of c programming
Introduction of c programmingIntroduction of c programming
Introduction of c programmingTarun Sharma
 
Overview of c language
Overview of c languageOverview of c language
Overview of c languageshalini392
 
Introduction to the c programming language (amazing and easy book for beginners)
Introduction to the c programming language (amazing and easy book for beginners)Introduction to the c programming language (amazing and easy book for beginners)
Introduction to the c programming language (amazing and easy book for beginners)mujeeb memon
 
Programming in C Basics
Programming in C BasicsProgramming in C Basics
Programming in C BasicsBharat Kalia
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterHossam Hassan
 
introduction to c programming language
introduction to c programming languageintroduction to c programming language
introduction to c programming languagesanjay joshi
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programmingAlpana Gupta
 
Introduction to C Language (By: Shujaat Abbas)
Introduction to C Language (By: Shujaat Abbas)Introduction to C Language (By: Shujaat Abbas)
Introduction to C Language (By: Shujaat Abbas)Shujaat Abbas
 
Medicaid organization profile
Medicaid organization profileMedicaid organization profile
Medicaid organization profileAnurag Byala
 

Viewers also liked (20)

Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
 
C ppt
C pptC ppt
C ppt
 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programming
 
Introduction of c programming
Introduction of c programmingIntroduction of c programming
Introduction of c programming
 
Overview of c language
Overview of c languageOverview of c language
Overview of c language
 
C tutorial
C tutorialC tutorial
C tutorial
 
Concept of c
Concept of cConcept of c
Concept of c
 
Introduction to the c programming language (amazing and easy book for beginners)
Introduction to the c programming language (amazing and easy book for beginners)Introduction to the c programming language (amazing and easy book for beginners)
Introduction to the c programming language (amazing and easy book for beginners)
 
Programming in C Basics
Programming in C BasicsProgramming in C Basics
Programming in C Basics
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals master
 
C notes.pdf
C notes.pdfC notes.pdf
C notes.pdf
 
introduction to c programming language
introduction to c programming languageintroduction to c programming language
introduction to c programming language
 
C language ppt
C language pptC language ppt
C language ppt
 
C LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDY
C LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDYC LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDY
C LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDY
 
Unit ii
Unit   iiUnit   ii
Unit ii
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Introduction to C Language (By: Shujaat Abbas)
Introduction to C Language (By: Shujaat Abbas)Introduction to C Language (By: Shujaat Abbas)
Introduction to C Language (By: Shujaat Abbas)
 
Medicaid organization profile
Medicaid organization profileMedicaid organization profile
Medicaid organization profile
 
C language. Introduction
C language. IntroductionC language. Introduction
C language. Introduction
 

Similar to Introduction to programming with c,

C Programming language - introduction
C Programming  language - introduction  C Programming  language - introduction
C Programming language - introduction GopikaS12
 
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
 
Introduction of c language
Introduction of c languageIntroduction of c language
Introduction of c languagefarishah
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfSubramanyambharathis
 
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 CANTTBatra Centre
 
Why C is Called Structured Programming Language
Why C is Called Structured Programming LanguageWhy C is Called Structured Programming Language
Why C is Called Structured Programming LanguageSinbad Konick
 
CS8251_QB_answers.pdf
CS8251_QB_answers.pdfCS8251_QB_answers.pdf
CS8251_QB_answers.pdfvino108206
 
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
 
Unit-2_Getting Started With ‘C’ Language (3).pptx
Unit-2_Getting Started With ‘C’ Language (3).pptxUnit-2_Getting Started With ‘C’ Language (3).pptx
Unit-2_Getting Started With ‘C’ Language (3).pptxSanketShah544615
 
Chapter 3(1)
Chapter 3(1)Chapter 3(1)
Chapter 3(1)TejaswiB4
 
C notes by m v b reddy(gitam)imp notes all units notes 5 unit order
C notes by m v b  reddy(gitam)imp  notes  all units notes  5 unit orderC notes by m v b  reddy(gitam)imp  notes  all units notes  5 unit order
C notes by m v b reddy(gitam)imp notes all units notes 5 unit orderMalikireddy Bramhananda Reddy
 
Book management system
Book management systemBook management system
Book management systemSHARDA SHARAN
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptxMugilvannan11
 

Similar to Introduction to programming with c, (20)

C Programming language - introduction
C Programming  language - introduction  C Programming  language - introduction
C Programming language - introduction
 
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)
 
Introduction of c language
Introduction of c languageIntroduction of c language
Introduction of c language
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
 
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
 
Introduction to c language
Introduction to c language Introduction to c language
Introduction to c language
 
Programming in c
Programming in cProgramming in c
Programming in c
 
Why C is Called Structured Programming Language
Why C is Called Structured Programming LanguageWhy C is Called Structured Programming Language
Why C is Called Structured Programming Language
 
CS8251_QB_answers.pdf
CS8251_QB_answers.pdfCS8251_QB_answers.pdf
CS8251_QB_answers.pdf
 
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
 
Unit-2_Getting Started With ‘C’ Language (3).pptx
Unit-2_Getting Started With ‘C’ Language (3).pptxUnit-2_Getting Started With ‘C’ Language (3).pptx
Unit-2_Getting Started With ‘C’ Language (3).pptx
 
C lecture notes new
C lecture notes newC lecture notes new
C lecture notes new
 
chapter 1.pptx
chapter 1.pptxchapter 1.pptx
chapter 1.pptx
 
Chapter 3(1)
Chapter 3(1)Chapter 3(1)
Chapter 3(1)
 
C notes by m v b reddy(gitam)imp notes all units notes 5 unit order
C notes by m v b  reddy(gitam)imp  notes  all units notes  5 unit orderC notes by m v b  reddy(gitam)imp  notes  all units notes  5 unit order
C notes by m v b reddy(gitam)imp notes all units notes 5 unit order
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
The smartpath information systems c pro
The smartpath information systems c proThe smartpath information systems c pro
The smartpath information systems c pro
 
Book management system
Book management systemBook management system
Book management system
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
 
C AND DATASTRUCTURES PREPARED BY M V B REDDY
C AND DATASTRUCTURES PREPARED BY M V B REDDYC AND DATASTRUCTURES PREPARED BY M V B REDDY
C AND DATASTRUCTURES PREPARED BY M V B REDDY
 

More from Hossain Md Shakhawat (20)

Recipe for the effective presentaion
Recipe for the effective presentaionRecipe for the effective presentaion
Recipe for the effective presentaion
 
The Road to Higher study in Japan
The Road to Higher study in JapanThe Road to Higher study in Japan
The Road to Higher study in Japan
 
Application of dfs
Application of dfsApplication of dfs
Application of dfs
 
Breadth first search and depth first search
Breadth first search and  depth first searchBreadth first search and  depth first search
Breadth first search and depth first search
 
Islamic jurisprudence
Islamic jurisprudenceIslamic jurisprudence
Islamic jurisprudence
 
Introduction to Medical Imaging
Introduction to Medical ImagingIntroduction to Medical Imaging
Introduction to Medical Imaging
 
Jpeg compression
Jpeg compressionJpeg compression
Jpeg compression
 
Surah Fatiha
Surah FatihaSurah Fatiha
Surah Fatiha
 
Hashing
HashingHashing
Hashing
 
Decision making and looping
Decision making and loopingDecision making and looping
Decision making and looping
 
Decision making and branching
Decision making and branchingDecision making and branching
Decision making and branching
 
Digital signature
Digital signatureDigital signature
Digital signature
 
Caesar cipher
Caesar cipherCaesar cipher
Caesar cipher
 
Rsa rivest shamir adleman
Rsa rivest shamir adlemanRsa rivest shamir adleman
Rsa rivest shamir adleman
 
Fundamentals of cryptography
Fundamentals of cryptographyFundamentals of cryptography
Fundamentals of cryptography
 
Introduction to digital image processing
Introduction to digital image processingIntroduction to digital image processing
Introduction to digital image processing
 
History of computing
History of computingHistory of computing
History of computing
 
Introduction to Printers
Introduction to PrintersIntroduction to Printers
Introduction to Printers
 
Input devices_(Mouse and Keyboard)
Input devices_(Mouse and Keyboard)Input devices_(Mouse and Keyboard)
Input devices_(Mouse and Keyboard)
 
Binary search tree(bst)
Binary search tree(bst)Binary search tree(bst)
Binary search tree(bst)
 

Recently uploaded

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 

Recently uploaded (20)

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 

Introduction to programming with c,

  • 2. 2 First Step to the 21st Century Literacy : Programming First Step to the 21st Century Literacy : Programming
  • 3. Introduction to C  The C programming language was designed or invented by Dennis Ritchie at Bell Laboratories in the early 1970s  Influenced by  ALGOL 60 (1960),  CPL (Cambridge, 1963),  BCPL (Martin Richard, 1967),  B (Ken Thompson, 1970)  Traditional C:  The C Programming Language, by Brian Kernighan and Dennis Ritchie, 2nd Edition, Prentice Hall  Referred to as K&R  Standardized in 1989 by ANSI (American National Standards Institute) known as ANSI C 3
  • 4. 4 The Father of C Programming and UNIX The Father of C Programming and UNIX
  • 5. Introduction to C  C is a Middle-level language: suitable language for systems programming  It is a procedural or sequential language  C is also called ELL or English like language  C is easy to learn or understand  It is a case sensitive language  C is a small language: relies on a “library” of standard functions  C is highly portable: means that c programs written for one computer can be run on other computer with no modification.  C is a permissive language: it assumes that you know what you’re doing, so it allows you a wider degree of latitude than many languages. It doesn’t mandate the detailed error-checking found in other language 5
  • 6. Strength of C 1. Portability: means that c programs written for one computer can be run on other computer with no modification. 2. Robustness: it is a robust language which is rich in built in functions and operators. 3. Easy to understand: it is called ELL as almost all the structures are very much similar to English language. 4. Efficiency: intended for applications where assembly language had traditionally been used. 5. Power: large collection of data types and operators 6. Flexibility: not only for system but also for embedded system commercial data processing 7. Programs written in C is fast and efficient 8. Standard library 9. Integration with UNIX 6
  • 7. Weakness of C 1. error-prone 2. Difficult to modify 3. Difficult to debug 4. It is difficult to write large codes or solve complex problems in C 7
  • 8. Basic Structure of C Programs 1. Documentation Section 2. Link section 3. Definition Section 4. Global Declaration Section 5. Main Function( ) { 1. Declaration part 2. Executable part } 6. Subprogram section User defined functions are build here 8
  • 9. Basic Structure of C 1. Documentation section: it consists of a set of comment lines giving the name of the program, the author, the purpose of the program and how the program works. The intention is to provide with some documentation or information so that the program can be used or analyzed later. 2. Link section: it provides instruction to the compiler to link functions from the system library. 3. Definition section: definition of all the symbolic constants are goes here. (if any symbolic constants are used in the program) 4. Global declaration: global variables are declared here. The user defined functions also can be declared here. (if any global variables are used in the program) 9
  • 10. Basic Structure of C 5. Main function section: every C program must have one main function. This section contains two parts: declaration part and executable part. These two parts must appear in between the opening and closing curly braces. The declaration part declares all the variables that are going to be used in the executable part. The executable part contains the main programming logical statements or algorithm statements. The executable must contain at least one statement. All the statements in the declaration and executable parts must end with a semicolon (;). This section is the logical end of the program. 6. Subprogram section: if necessary then user defined functions are defined here or created here.(if user defined functions are used) 10
  • 11. Need to understand  Concept of definition and declaration  Declaration: it tells or declares the identity or type of something. Like Rahim is a boy. It means Rahim is here declared as a boy.  Definition: it tells or defines the specific type. Like in definition section we will define or describe what are the characteristics of a boy or how the boy works. 11
  • 12. Need to understand  ( ) – is called the parenthesis  { } – is called the curly braces  [ ] – is called the bracket  Parenthesis is used to denote a function  Curly braces is used to create a body  Every statement in C ends with a semicolon 12
  • 13. A Simple C Program /* This is the sample program to print a message hello world. This is done by course teacher */ #include <stdio.h> #include <conio.h> main ( ) { clrscr(); printf(“Hello Worldn”); getch(); } 13
  • 14. How a C program is Executed ?  A C program is executed in three phases: 1. Creating Source Code file [ Empty file(input) Source Code File(output) ] 2. Compiling [ Source Code File(input) Object File(output) ] 3. Linking [ Object File(input) Executable File(output) ] 14
  • 15. How a C program is Executed ? Creating Source Code Creating Source Code Compiling Source Code Compiling Source Code Linking Object File Linking Object File [ Source Code File .c ] [ Object File .obj ] [ Executable File .exe ] [ Empty File ] 15
  • 16. Step by step procedure how a C program is executed Step by step procedure how a C program is executed 16
  • 17. How a C program is executed ? How a C program is executed ? 17
  • 18. 18 Md. Shakhawat Hossain Student of Department of Computer Science & Engineering University of Rajshahi E-mail: mshimul86@gmail.com