SlideShare a Scribd company logo
1 of 17
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

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 TermMuhammadWaseem305
 
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 pptJStalinAsstProfessor
 
Variables in C and C++ Language
Variables in C and C++ LanguageVariables in C and C++ Language
Variables in C and C++ LanguageWay2itech
 
Programming in C- Introduction
Programming in C- IntroductionProgramming in C- Introduction
Programming in C- Introductionsavitamhaske
 
C programming | Class 8 | III Term
C programming  | Class 8  | III TermC programming  | Class 8  | III Term
C programming | Class 8 | III TermAndrew Raj
 
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
 
Basic Programming of c++
Basic Programming of c++Basic Programming of c++
Basic Programming of c++MMAbdullah17
 
Unit 4 Foc
Unit 4 FocUnit 4 Foc
Unit 4 FocJAYA
 
Variables in C Programming
Variables in C ProgrammingVariables in C Programming
Variables in C Programmingprogramming9
 

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-oscuroalvarowerner
 
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 Casonamencinasf
 
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 rubiacarlos 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 pptlekshmirv
 
Castilla Y LeóN
Castilla Y LeóNCastilla Y LeóN
Castilla Y LeóNmencinasf
 
Проблематика развития малого бизнеса на базе закупочной деятельности
Проблематика развития малого бизнеса на базе закупочной деятельностиПроблематика развития малого бизнеса на базе закупочной деятельности
Проблематика развития малого бизнеса на базе закупочной деятельности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-2006exodumuser
 

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 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 Centrejatin batra
 
C programming course material
C programming course materialC programming course material
C programming course materialRanjitha Murthy
 
Introduction to C Unit 1
Introduction to C Unit 1Introduction to C Unit 1
Introduction to C Unit 1SURBHI SAROHA
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C ProgrammingMOHAMAD NOH AHMAD
 
Interview Questions For C Language .pptx
Interview Questions For C Language .pptxInterview Questions For C Language .pptx
Interview Questions For C Language .pptxRowank2
 
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 pptxinoe
 
Unit 2 introduction to c programming
Unit 2   introduction to c programmingUnit 2   introduction to c programming
Unit 2 introduction to c programmingMithun DSouza
 
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 ProgrammingPreeti 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.compressedJuhi Shah
 
DE1(a) Report format
DE1(a) Report formatDE1(a) Report format
DE1(a) Report formatJuhi Shah
 
DE1(a) my report
DE1(a) my reportDE1(a) my report
DE1(a) my reportJuhi 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 indiaJuhi Shah
 
Town planing
Town planingTown planing
Town planingJuhi Shah
 
Building Construction
Building ConstructionBuilding Construction
Building ConstructionJuhi 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-designJuhi Shah
 
Eem mgt-answers
Eem mgt-answersEem mgt-answers
Eem mgt-answersJuhi Shah
 
Eem eco faq_answer
Eem eco faq_answerEem eco faq_answer
Eem eco faq_answerJuhi Shah
 
Building construction 2130607
Building construction 2130607Building construction 2130607
Building construction 2130607Juhi Shah
 
Geotechnics & applied geology 21306006
Geotechnics & applied geology 21306006Geotechnics & applied geology 21306006
Geotechnics & applied geology 21306006Juhi Shah
 
Mechanics of solids 21306003
Mechanics of solids 21306003Mechanics of solids 21306003
Mechanics of solids 21306003Juhi Shah
 
Engineering graphics 2110013
Engineering graphics 2110013Engineering graphics 2110013
Engineering graphics 2110013Juhi Shah
 
Contributor personality development program 2990001
Contributor personality development program 2990001Contributor personality development program 2990001
Contributor personality development program 2990001Juhi Shah
 
Reading skills cs
Reading skills csReading skills cs
Reading skills csJuhi 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

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
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
 
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
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
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
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
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
 

Recently uploaded (20)

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
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
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
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 ...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
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
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
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
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 

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