SlideShare a Scribd company logo
Subject code: 2110003
Om Institute of Technology 1
Om Institute of Technology 2
History of ‘c’
Features of ‘c’
Structure of program
Header files
Main function
Data type
Constant
Variables
Operators
Input/output
C preprocessor
Om Institute of Technology 3
Om Institute of Technology 4
 C is developed by Dennis Ritchie
 C is a structured programming language
 C supports functions that enables easy maintainability of
code, by breaking large file into smaller modules
 Comments in C provides easy readability
 C is a powerful language
Om Institute of Technology 5
 Important feature of ‘C’ language is it is portable, by
portability we mean that the program can be run on any
hardware machine.
 It supports modular programming.
 It supports bit-wise operations.
 It is known as structured programming language.
Om Institute of Technology 6
 Documentation Section //optional
 Link section //optional
 Defining section //optional
 Global declaration section //optional
 Main function section //Must
 {
 Declaration part
 Executable part.
 }
 Sub program section //optional
 Function 1
 Function 2
 .
 .
 Function n
Om Institute of Technology 7
 The files that are specified in the include section is called as
header file
 These are precompiled files that has some functions defined in
them
 We can call those functions in our program by supplying
parameters
 Header file is given an extension .h
 C Source file is given an extension .c
Om Institute of Technology 8
 This is the entry point of a program
 When a file is executed, the start point is the main function
 From main function the flow goes as per the programmers
choice.
 There may or may not be other functions written by user in a
program
 Main function is compulsory for any c program
Om Institute of Technology 9
A data type in a programming language is a set
of data values having predefine characteristics.
there are three classes of data types:
Data Type
Primitive derived user define
Om Institute of Technology 10
 Primitive data types
int, float, double, char
 Aggregate data types
Arrays come under this category
Arrays can contain collection of int or float or char or
double data
 User defined data types
Structures and enum fall under this category.
Om Institute of Technology 11
 The ‘C’ language supports following types of
constants:
Numeric constants (5, 15, 3.6, -5.4 etc)
Non-numeric constants
 Character constants (‘B’ , ‘a’ , ‘?’ , ‘5’ , ‘+’ etc)
 String Constants (“Computer”, “XYZ”, “-5.4” etc)
Om Institute of Technology 12
 a Bell
 b Back space
 f Form feed
 n New line
 r Carriage return
 t Horizontal tab
 v vertical tab
 ’ single quote
 ” Double quote
 ? Question Mark
  Backslash
 0 Null
Om Institute of Technology 13
 Variables are the identifiers whose value changes as opposite
to constants.
 As variable is an identifier, all the rules for naming an
identifier applies to variables also.
 Should not be a reserved word like int etc..
 Should start with a letter or an underscore(_)
 Can contain letters, numbers or underscore.
 No other special characters are allowed including space
 Variable names are case sensitive
 A and a are different.
Om Institute of Technology 14
 Arithmetic (+,-,*,/,%)
 Relational (<,>,<=,>=,==,!=)
 Logical (&&,||,!)
 Bitwise (&,|)
 Assignment (=)
 Compound assignment(+=,*=,-=,/=,%=,&=,|=)
 Shift (right shift >>, left shift <<)
Om Institute of Technology 15
 Input
scanf(“%d”,&a);
Gets an integer value from the user and stores it under
the name “a”
 Output
printf(“%d”,a);
Prints the value present in variable a on the screen
Om Institute of Technology 16
 All preprocessor directives begin with #
 Possible actions
Inclusion of other files
Definition of symbolic constants & macros
Conditional compilation of program code
Conditional compilation of preprocessor directives
Om Institute of Technology 17

More Related Content

What's hot

Basics of c
Basics of cBasics of c
Basics of c
vinothini1996
 
Introduction to C Programming - I
Introduction to C Programming - I Introduction to C Programming - I
Introduction to C Programming - I
vampugani
 
Basic Structure of C Language and Related Term
Basic Structure of C Language  and Related TermBasic Structure of C Language  and Related Term
Basic Structure of C Language and Related Term
MuhammadWaseem305
 
Introduction of c programming unit-ii ppt
Introduction of  c programming unit-ii pptIntroduction of  c programming unit-ii ppt
Introduction of c programming unit-ii ppt
JStalinAsstProfessor
 
Methods in C#
Methods in C#Methods in C#
Methods in C#
Prasanna Kumar SM
 
CP Handout#1
CP Handout#1CP Handout#1
CP Handout#1
trupti1976
 
Variables in C and C++ Language
Variables in C and C++ LanguageVariables in C and C++ Language
Variables in C and C++ Language
Way2itech
 
Programming in C- Introduction
Programming in C- IntroductionProgramming in C- Introduction
Programming in C- Introduction
savitamhaske
 
Handout#08
Handout#08Handout#08
Handout#08
Sunita Milind Dol
 
C programming | Class 8 | III Term
C programming  | Class 8  | III TermC programming  | Class 8  | III Term
C programming | Class 8 | III TermAndrew Raj
 
Tokens in C++
Tokens in C++Tokens in C++
Tokens in C++
Mahender Boda
 
Chapter1 c programming data types, variables and constants
Chapter1 c programming   data types, variables and constantsChapter1 c programming   data types, variables and constants
Chapter1 c programming data types, variables and constantsvinay arora
 
C Token’s
C Token’sC Token’s
C Token’s
Tarun Sharma
 
Basic Programming of c++
Basic Programming of c++Basic Programming of c++
Basic Programming of c++
MMAbdullah17
 
C presentation
C presentationC presentation
Clanguage
ClanguageClanguage
Clanguage
Vidyacenter
 
Unit 4 Foc
Unit 4 FocUnit 4 Foc
Unit 4 Foc
JAYA
 
Variables in C Programming
Variables in C ProgrammingVariables in C Programming
Variables in C Programming
programming9
 
CProgrammingTutorial
CProgrammingTutorialCProgrammingTutorial
CProgrammingTutorial
Muthuselvam RS
 

What's hot (20)

C tutorial
C tutorialC tutorial
C tutorial
 
Basics of c
Basics of cBasics of c
Basics of c
 
Introduction to C Programming - I
Introduction to C Programming - I Introduction to C Programming - I
Introduction to C Programming - I
 
Basic Structure of C Language and Related Term
Basic Structure of C Language  and Related TermBasic Structure of C Language  and Related Term
Basic Structure of C Language and Related Term
 
Introduction of c programming unit-ii ppt
Introduction of  c programming unit-ii pptIntroduction of  c programming unit-ii ppt
Introduction of c programming unit-ii ppt
 
Methods in C#
Methods in C#Methods in C#
Methods in C#
 
CP Handout#1
CP Handout#1CP Handout#1
CP Handout#1
 
Variables in C and C++ Language
Variables in C and C++ LanguageVariables in C and C++ Language
Variables in C and C++ Language
 
Programming in C- Introduction
Programming in C- IntroductionProgramming in C- Introduction
Programming in C- Introduction
 
Handout#08
Handout#08Handout#08
Handout#08
 
C programming | Class 8 | III Term
C programming  | Class 8  | III TermC programming  | Class 8  | III Term
C programming | Class 8 | III Term
 
Tokens in C++
Tokens in C++Tokens in C++
Tokens in C++
 
Chapter1 c programming data types, variables and constants
Chapter1 c programming   data types, variables and constantsChapter1 c programming   data types, variables and constants
Chapter1 c programming data types, variables and constants
 
C Token’s
C Token’sC Token’s
C Token’s
 
Basic Programming of c++
Basic Programming of c++Basic Programming of c++
Basic Programming of c++
 
C presentation
C presentationC presentation
C presentation
 
Clanguage
ClanguageClanguage
Clanguage
 
Unit 4 Foc
Unit 4 FocUnit 4 Foc
Unit 4 Foc
 
Variables in C Programming
Variables in C ProgrammingVariables in C Programming
Variables in C Programming
 
CProgrammingTutorial
CProgrammingTutorialCProgrammingTutorial
CProgrammingTutorial
 

Viewers also liked

Curriculum vitae-modelo1-oscuro
Curriculum vitae-modelo1-oscuroCurriculum vitae-modelo1-oscuro
Curriculum vitae-modelo1-oscuro
alvarowerner
 
2016BLIKSEN板金設計と加工の会社概要
2016BLIKSEN板金設計と加工の会社概要2016BLIKSEN板金設計と加工の会社概要
2016BLIKSEN板金設計と加工の会社概要
BLIKSEN CO.,LTD.
 
Ejercicio módulo 4 ( ivonne ortiz y maría consuelo caycedo)
Ejercicio módulo 4 ( ivonne ortiz y maría consuelo caycedo)Ejercicio módulo 4 ( ivonne ortiz y maría consuelo caycedo)
Ejercicio módulo 4 ( ivonne ortiz y maría consuelo caycedo)
Arminio del Cristo Mestra Osorio
 
Alejandro Casona
Alejandro CasonaAlejandro Casona
Alejandro Casona
mencinasf
 
Presentation on Best Ways to Retain Everything you Learn – CommLab India
Presentation on Best Ways to Retain Everything you Learn – CommLab IndiaPresentation on Best Ways to Retain Everything you Learn – CommLab India
Presentation on Best Ways to Retain Everything you Learn – CommLab India
CommLab India – Rapid eLearning Solutions
 
Curriculum vitae presentacion carlos jesus gelde rubia
Curriculum vitae presentacion carlos jesus gelde rubiaCurriculum vitae presentacion carlos jesus gelde rubia
Curriculum vitae presentacion carlos jesus gelde rubia
carlos jesus gelde rubia
 
Project Coding Mask ( SAP PS )
Project Coding Mask ( SAP PS )Project Coding Mask ( SAP PS )
Project Coding Mask ( SAP PS )
Soumya De
 
Qualities of science teacher ppt
Qualities   of   science    teacher pptQualities   of   science    teacher ppt
Qualities of science teacher ppt
lekshmirv
 
Castilla Y LeóN
Castilla Y LeóNCastilla Y LeóN
Castilla Y LeóN
mencinasf
 
Simple Present
Simple Present Simple Present
Simple Present
Mike Villegas
 
Проблематика развития малого бизнеса на базе закупочной деятельности
Проблематика развития малого бизнеса на базе закупочной деятельностиПроблематика развития малого бизнеса на базе закупочной деятельности
Проблематика развития малого бизнеса на базе закупочной деятельности
bull2396
 
229235694 nulităţile-in-procesul-penal-practică-judiciară-al-vasiliu-2006
229235694 nulităţile-in-procesul-penal-practică-judiciară-al-vasiliu-2006229235694 nulităţile-in-procesul-penal-practică-judiciară-al-vasiliu-2006
229235694 nulităţile-in-procesul-penal-practică-judiciară-al-vasiliu-2006
exodumuser
 

Viewers also liked (13)

Curriculum vitae-modelo1-oscuro
Curriculum vitae-modelo1-oscuroCurriculum vitae-modelo1-oscuro
Curriculum vitae-modelo1-oscuro
 
degree certificate
degree certificatedegree certificate
degree certificate
 
2016BLIKSEN板金設計と加工の会社概要
2016BLIKSEN板金設計と加工の会社概要2016BLIKSEN板金設計と加工の会社概要
2016BLIKSEN板金設計と加工の会社概要
 
Ejercicio módulo 4 ( ivonne ortiz y maría consuelo caycedo)
Ejercicio módulo 4 ( ivonne ortiz y maría consuelo caycedo)Ejercicio módulo 4 ( ivonne ortiz y maría consuelo caycedo)
Ejercicio módulo 4 ( ivonne ortiz y maría consuelo caycedo)
 
Alejandro Casona
Alejandro CasonaAlejandro Casona
Alejandro Casona
 
Presentation on Best Ways to Retain Everything you Learn – CommLab India
Presentation on Best Ways to Retain Everything you Learn – CommLab IndiaPresentation on Best Ways to Retain Everything you Learn – CommLab India
Presentation on Best Ways to Retain Everything you Learn – CommLab India
 
Curriculum vitae presentacion carlos jesus gelde rubia
Curriculum vitae presentacion carlos jesus gelde rubiaCurriculum vitae presentacion carlos jesus gelde rubia
Curriculum vitae presentacion carlos jesus gelde rubia
 
Project Coding Mask ( SAP PS )
Project Coding Mask ( SAP PS )Project Coding Mask ( SAP PS )
Project Coding Mask ( SAP PS )
 
Qualities of science teacher ppt
Qualities   of   science    teacher pptQualities   of   science    teacher ppt
Qualities of science teacher ppt
 
Castilla Y LeóN
Castilla Y LeóNCastilla Y LeóN
Castilla Y LeóN
 
Simple Present
Simple Present Simple Present
Simple Present
 
Проблематика развития малого бизнеса на базе закупочной деятельности
Проблематика развития малого бизнеса на базе закупочной деятельностиПроблематика развития малого бизнеса на базе закупочной деятельности
Проблематика развития малого бизнеса на базе закупочной деятельности
 
229235694 nulităţile-in-procesul-penal-practică-judiciară-al-vasiliu-2006
229235694 nulităţile-in-procesul-penal-practică-judiciară-al-vasiliu-2006229235694 nulităţile-in-procesul-penal-practică-judiciară-al-vasiliu-2006
229235694 nulităţile-in-procesul-penal-practică-judiciară-al-vasiliu-2006
 

Similar to Computer programming and utilization 2110003

C Programming Unit-1
C Programming Unit-1C Programming Unit-1
C Programming Unit-1
Vikram Nandini
 
C programming Training in Ambala ! Batra Computer Centre
C programming Training in Ambala ! Batra Computer CentreC programming Training in Ambala ! Batra Computer Centre
C programming Training in Ambala ! Batra Computer Centre
jatin batra
 
C programming course material
C programming course materialC programming course material
C programming course material
Ranjitha Murthy
 
C
CC
C language ppt
C language pptC language ppt
C language ppt
Ğäùråv Júñêjå
 
c programming session 1.pptx
c programming session 1.pptxc programming session 1.pptx
c programming session 1.pptx
RSathyaPriyaCSEKIOT
 
Introduction%20C.pptx
Introduction%20C.pptxIntroduction%20C.pptx
Introduction%20C.pptx
20EUEE018DEEPAKM
 
Introduction to C Unit 1
Introduction to C Unit 1Introduction to C Unit 1
Introduction to C Unit 1
SURBHI SAROHA
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
MOHAMAD NOH AHMAD
 
Interview Questions For C Language .pptx
Interview Questions For C Language .pptxInterview Questions For C Language .pptx
Interview Questions For C Language .pptx
Rowank2
 
Interview Questions For C Language
Interview Questions For C Language Interview Questions For C Language
Interview Questions For C Language
Rowank2
 
C prog ppt
C prog pptC prog ppt
C prog ppt
xinoe
 
Aniket tore
Aniket toreAniket tore
Aniket tore
anikettore1
 
Basic of C Programming | 2022 Updated | By Shamsul H. Ansari
Basic of C Programming | 2022 Updated | By Shamsul H. AnsariBasic of C Programming | 2022 Updated | By Shamsul H. Ansari
Basic of C Programming | 2022 Updated | By Shamsul H. Ansari
G. H. Raisoni Academy of Engineering & Technology, Nagpur
 
history of c.ppt
history of c.ppthistory of c.ppt
history of c.ppt
arpanabharani
 
C intro
C introC intro
C intro
SHIKHA GAUTAM
 
Unit 2 introduction to c programming
Unit 2   introduction to c programmingUnit 2   introduction to c programming
Unit 2 introduction to c programming
Mithun DSouza
 
C introduction
C introductionC introduction
C introduction
AswathyBAnil
 
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
ANUSUYA S
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
Preeti Kashyap
 

Similar to Computer programming and utilization 2110003 (20)

C Programming Unit-1
C Programming Unit-1C Programming Unit-1
C Programming Unit-1
 
C programming Training in Ambala ! Batra Computer Centre
C programming Training in Ambala ! Batra Computer CentreC programming Training in Ambala ! Batra Computer Centre
C programming Training in Ambala ! Batra Computer Centre
 
C programming course material
C programming course materialC programming course material
C programming course material
 
C
CC
C
 
C language ppt
C language pptC language ppt
C language ppt
 
c programming session 1.pptx
c programming session 1.pptxc programming session 1.pptx
c programming session 1.pptx
 
Introduction%20C.pptx
Introduction%20C.pptxIntroduction%20C.pptx
Introduction%20C.pptx
 
Introduction to C Unit 1
Introduction to C Unit 1Introduction to C Unit 1
Introduction to C Unit 1
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
Interview Questions For C Language .pptx
Interview Questions For C Language .pptxInterview Questions For C Language .pptx
Interview Questions For C Language .pptx
 
Interview Questions For C Language
Interview Questions For C Language Interview Questions For C Language
Interview Questions For C Language
 
C prog ppt
C prog pptC prog ppt
C prog ppt
 
Aniket tore
Aniket toreAniket tore
Aniket tore
 
Basic of C Programming | 2022 Updated | By Shamsul H. Ansari
Basic of C Programming | 2022 Updated | By Shamsul H. AnsariBasic of C Programming | 2022 Updated | By Shamsul H. Ansari
Basic of C Programming | 2022 Updated | By Shamsul H. Ansari
 
history of c.ppt
history of c.ppthistory of c.ppt
history of c.ppt
 
C intro
C introC intro
C intro
 
Unit 2 introduction to c programming
Unit 2   introduction to c programmingUnit 2   introduction to c programming
Unit 2 introduction to c programming
 
C introduction
C introductionC introduction
C introduction
 
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 

More from Juhi Shah

Numerical and statistical_methods.compressed
Numerical and statistical_methods.compressedNumerical and statistical_methods.compressed
Numerical and statistical_methods.compressed
Juhi Shah
 
DE1(a) Report format
DE1(a) Report formatDE1(a) Report format
DE1(a) Report format
Juhi Shah
 
DE1(a) my report
DE1(a) my reportDE1(a) my report
DE1(a) my report
Juhi Shah
 
Weightage
WeightageWeightage
Weightage
Juhi Shah
 
De 1 (b)
De 1 (b)De 1 (b)
De 1 (b)
Juhi Shah
 
DE1b Report format
DE1b Report format DE1b Report format
DE1b Report format
Juhi Shah
 
History of townplanning in india
History of townplanning in indiaHistory of townplanning in india
History of townplanning in india
Juhi Shah
 
Town planing
Town planingTown planing
Town planing
Juhi Shah
 
Building Construction
Building ConstructionBuilding Construction
Building Construction
Juhi Shah
 
Lecture notes-in-structural-engineering-analysis-design
Lecture notes-in-structural-engineering-analysis-designLecture notes-in-structural-engineering-analysis-design
Lecture notes-in-structural-engineering-analysis-design
Juhi Shah
 
Eem mgt-answers
Eem mgt-answersEem mgt-answers
Eem mgt-answers
Juhi Shah
 
Eem assg1
Eem assg1Eem assg1
Eem assg1
Juhi Shah
 
EEM assi2
EEM assi2EEM assi2
EEM assi2
Juhi Shah
 
Eem eco faq_answer
Eem eco faq_answerEem eco faq_answer
Eem eco faq_answer
Juhi Shah
 
Building construction 2130607
Building construction 2130607Building construction 2130607
Building construction 2130607
Juhi Shah
 
Geotechnics & applied geology 21306006
Geotechnics & applied geology 21306006Geotechnics & applied geology 21306006
Geotechnics & applied geology 21306006
Juhi Shah
 
Mechanics of solids 21306003
Mechanics of solids 21306003Mechanics of solids 21306003
Mechanics of solids 21306003
Juhi Shah
 
Engineering graphics 2110013
Engineering graphics 2110013Engineering graphics 2110013
Engineering graphics 2110013
Juhi Shah
 
Contributor personality development program 2990001
Contributor personality development program 2990001Contributor personality development program 2990001
Contributor personality development program 2990001
Juhi Shah
 
Reading skills cs
Reading skills csReading skills cs
Reading skills cs
Juhi Shah
 

More from Juhi Shah (20)

Numerical and statistical_methods.compressed
Numerical and statistical_methods.compressedNumerical and statistical_methods.compressed
Numerical and statistical_methods.compressed
 
DE1(a) Report format
DE1(a) Report formatDE1(a) Report format
DE1(a) Report format
 
DE1(a) my report
DE1(a) my reportDE1(a) my report
DE1(a) my report
 
Weightage
WeightageWeightage
Weightage
 
De 1 (b)
De 1 (b)De 1 (b)
De 1 (b)
 
DE1b Report format
DE1b Report format DE1b Report format
DE1b Report format
 
History of townplanning in india
History of townplanning in indiaHistory of townplanning in india
History of townplanning in india
 
Town planing
Town planingTown planing
Town planing
 
Building Construction
Building ConstructionBuilding Construction
Building Construction
 
Lecture notes-in-structural-engineering-analysis-design
Lecture notes-in-structural-engineering-analysis-designLecture notes-in-structural-engineering-analysis-design
Lecture notes-in-structural-engineering-analysis-design
 
Eem mgt-answers
Eem mgt-answersEem mgt-answers
Eem mgt-answers
 
Eem assg1
Eem assg1Eem assg1
Eem assg1
 
EEM assi2
EEM assi2EEM assi2
EEM assi2
 
Eem eco faq_answer
Eem eco faq_answerEem eco faq_answer
Eem eco faq_answer
 
Building construction 2130607
Building construction 2130607Building construction 2130607
Building construction 2130607
 
Geotechnics & applied geology 21306006
Geotechnics & applied geology 21306006Geotechnics & applied geology 21306006
Geotechnics & applied geology 21306006
 
Mechanics of solids 21306003
Mechanics of solids 21306003Mechanics of solids 21306003
Mechanics of solids 21306003
 
Engineering graphics 2110013
Engineering graphics 2110013Engineering graphics 2110013
Engineering graphics 2110013
 
Contributor personality development program 2990001
Contributor personality development program 2990001Contributor personality development program 2990001
Contributor personality development program 2990001
 
Reading skills cs
Reading skills csReading skills cs
Reading skills cs
 

Recently uploaded

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
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
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
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
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
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 

Recently uploaded (20)

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
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
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
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.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
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 

Computer programming and utilization 2110003

  • 1. Subject code: 2110003 Om Institute of Technology 1
  • 2. Om Institute of Technology 2
  • 3. History of ‘c’ Features of ‘c’ Structure of program Header files Main function Data type Constant Variables Operators Input/output C preprocessor Om Institute of Technology 3
  • 4. Om Institute of Technology 4  C is developed by Dennis Ritchie  C is a structured programming language  C supports functions that enables easy maintainability of code, by breaking large file into smaller modules  Comments in C provides easy readability  C is a powerful language
  • 5. Om Institute of Technology 5  Important feature of ‘C’ language is it is portable, by portability we mean that the program can be run on any hardware machine.  It supports modular programming.  It supports bit-wise operations.  It is known as structured programming language.
  • 6. Om Institute of Technology 6  Documentation Section //optional  Link section //optional  Defining section //optional  Global declaration section //optional  Main function section //Must  {  Declaration part  Executable part.  }  Sub program section //optional  Function 1  Function 2  .  .  Function n
  • 7. Om Institute of Technology 7  The files that are specified in the include section is called as header file  These are precompiled files that has some functions defined in them  We can call those functions in our program by supplying parameters  Header file is given an extension .h  C Source file is given an extension .c
  • 8. Om Institute of Technology 8  This is the entry point of a program  When a file is executed, the start point is the main function  From main function the flow goes as per the programmers choice.  There may or may not be other functions written by user in a program  Main function is compulsory for any c program
  • 9. Om Institute of Technology 9 A data type in a programming language is a set of data values having predefine characteristics. there are three classes of data types: Data Type Primitive derived user define
  • 10. Om Institute of Technology 10  Primitive data types int, float, double, char  Aggregate data types Arrays come under this category Arrays can contain collection of int or float or char or double data  User defined data types Structures and enum fall under this category.
  • 11. Om Institute of Technology 11  The ‘C’ language supports following types of constants: Numeric constants (5, 15, 3.6, -5.4 etc) Non-numeric constants  Character constants (‘B’ , ‘a’ , ‘?’ , ‘5’ , ‘+’ etc)  String Constants (“Computer”, “XYZ”, “-5.4” etc)
  • 12. Om Institute of Technology 12  a Bell  b Back space  f Form feed  n New line  r Carriage return  t Horizontal tab  v vertical tab  ’ single quote  ” Double quote  ? Question Mark  Backslash  0 Null
  • 13. Om Institute of Technology 13  Variables are the identifiers whose value changes as opposite to constants.  As variable is an identifier, all the rules for naming an identifier applies to variables also.  Should not be a reserved word like int etc..  Should start with a letter or an underscore(_)  Can contain letters, numbers or underscore.  No other special characters are allowed including space  Variable names are case sensitive  A and a are different.
  • 14. Om Institute of Technology 14  Arithmetic (+,-,*,/,%)  Relational (<,>,<=,>=,==,!=)  Logical (&&,||,!)  Bitwise (&,|)  Assignment (=)  Compound assignment(+=,*=,-=,/=,%=,&=,|=)  Shift (right shift >>, left shift <<)
  • 15. Om Institute of Technology 15  Input scanf(“%d”,&a); Gets an integer value from the user and stores it under the name “a”  Output printf(“%d”,a); Prints the value present in variable a on the screen
  • 16. Om Institute of Technology 16  All preprocessor directives begin with #  Possible actions Inclusion of other files Definition of symbolic constants & macros Conditional compilation of program code Conditional compilation of preprocessor directives
  • 17. Om Institute of Technology 17

Editor's Notes

  1. Format specifiers %d is the format specifier. This informs to the compiler that the incoming value is an integer value. Other data types can be specified as follows: %c – character %f – float %lf – double %s – character array (string) Printf and scanf are defined under the header file stdio.h