SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsManeerUddin
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 

Kürzlich hochgeladen (20)

YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Food processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture honsFood processing presentation for bsc agriculture hons
Food processing presentation for bsc agriculture hons
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 

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

Hinweis der Redaktion

  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