SlideShare a Scribd company logo
1 of 27
ACE Learning Hub
Erode 638 011
Mob:93600 48588
chandkec@gmail.com
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 2
C Variables, Constants and Literals
Variables
In programming, a variable is a container (storage area) to hold data.
To indicate the storage area, each variable should be given a unique name
(identifier).
Variable names are just the symbolic representation of a memory
location. For example:
• The value of a variable can be changed, hence the name variable
• Here, playerScore is a variable of int type.
• Here, the variable is assigned an integer value 95.
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 3
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 4
C is a strongly typed language. This means that the variable type cannot
be changed once it is declared. For example:
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 5
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 6
For example:
In C programming,
octal starts with a 0, and
hexadecimal starts with a 0x.
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 7
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 8
4. Escape Sequences
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 9
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 10
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 11
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 12
Basic types
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 13
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 14
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 15
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 16
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 17
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 18
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 19
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 20
C Output
In C programming, printf() is one of the main output function.
function sends formatted output to the screen. For example,
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 21
Output
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 22
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 23
• To print float,
we
use %f format
specifier.
• Similarly, we
use %lf to
print double valu
es.
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 24
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 25
Used %d format specifier inside
the scanf() function to
take int input from the user.
When the user enters an integer,
it is stored in
the testInteger variable.
Notice, that we have
used &testInteger inside scanf().
It is because &testInteger gets
the address of testInteger, and
the value entered by the user is
stored in that address.
Output
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 26
23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 27

More Related Content

Similar to Introduction to Turbo C data types

Data flow model -Lecture-4
Data flow model -Lecture-4Data flow model -Lecture-4
Data flow model -Lecture-4Dr.YNM
 
Electronic devices and circuits.pptx
Electronic devices and circuits.pptxElectronic devices and circuits.pptx
Electronic devices and circuits.pptxArunKumar674066
 
Introduction to programming c and data structures
Introduction to programming c and data structuresIntroduction to programming c and data structures
Introduction to programming c and data structuresPradipta Mishra
 
Introduction to programming c and data-structures
Introduction to programming c and data-structures Introduction to programming c and data-structures
Introduction to programming c and data-structures Pradipta Mishra
 
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...RSathyaPriyaCSEKIOT
 
20090814102834_嵌入式C与C++语言精华文章集锦.docx
20090814102834_嵌入式C与C++语言精华文章集锦.docx20090814102834_嵌入式C与C++语言精华文章集锦.docx
20090814102834_嵌入式C与C++语言精华文章集锦.docxMostafaParvin1
 
C programming tutorial
C programming tutorialC programming tutorial
C programming tutorialMohit Saini
 
Writing Efficient Code Feb 08
Writing Efficient Code Feb 08Writing Efficient Code Feb 08
Writing Efficient Code Feb 08Ganesh Samarthyam
 
Programming in C - interview questions.pdf
Programming in C - interview questions.pdfProgramming in C - interview questions.pdf
Programming in C - interview questions.pdfSergiuMatei7
 
Parametric Equations with Mathcad Prime
Parametric Equations with Mathcad PrimeParametric Equations with Mathcad Prime
Parametric Equations with Mathcad PrimeCaroline de Villèle
 
Dynamic memory allocation
Dynamic memory allocationDynamic memory allocation
Dynamic memory allocationMI RAKIB
 

Similar to Introduction to Turbo C data types (20)

Data flow model -Lecture-4
Data flow model -Lecture-4Data flow model -Lecture-4
Data flow model -Lecture-4
 
6276830.ppt
6276830.ppt6276830.ppt
6276830.ppt
 
Electronic devices and circuits.pptx
Electronic devices and circuits.pptxElectronic devices and circuits.pptx
Electronic devices and circuits.pptx
 
Presentation 2
Presentation 2Presentation 2
Presentation 2
 
Introduction to programming c and data structures
Introduction to programming c and data structuresIntroduction to programming c and data structures
Introduction to programming c and data structures
 
C Programming
C ProgrammingC Programming
C Programming
 
Introduction to programming c and data-structures
Introduction to programming c and data-structures Introduction to programming c and data-structures
Introduction to programming c and data-structures
 
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
UNIT-1 notes(Data Types – Variables – Operations – Expressions and Statements...
 
Using matlab simulink
Using matlab simulinkUsing matlab simulink
Using matlab simulink
 
Using matlab simulink
Using matlab simulinkUsing matlab simulink
Using matlab simulink
 
Ppt of c vs c#
Ppt of c vs c#Ppt of c vs c#
Ppt of c vs c#
 
20090814102834_嵌入式C与C++语言精华文章集锦.docx
20090814102834_嵌入式C与C++语言精华文章集锦.docx20090814102834_嵌入式C与C++语言精华文章集锦.docx
20090814102834_嵌入式C与C++语言精华文章集锦.docx
 
C programming tutorial
C programming tutorialC programming tutorial
C programming tutorial
 
Writing Efficient Code Feb 08
Writing Efficient Code Feb 08Writing Efficient Code Feb 08
Writing Efficient Code Feb 08
 
L08VariablesInC.ppt
L08VariablesInC.pptL08VariablesInC.ppt
L08VariablesInC.ppt
 
Programming in C - interview questions.pdf
Programming in C - interview questions.pdfProgramming in C - interview questions.pdf
Programming in C - interview questions.pdf
 
C fundamentals
C fundamentalsC fundamentals
C fundamentals
 
Parametric Equations with Mathcad Prime
Parametric Equations with Mathcad PrimeParametric Equations with Mathcad Prime
Parametric Equations with Mathcad Prime
 
Basics of c
Basics of cBasics of c
Basics of c
 
Dynamic memory allocation
Dynamic memory allocationDynamic memory allocation
Dynamic memory allocation
 

More from chandkec

Class 8 Science :Conservation of plants and animals
Class 8 Science :Conservation of plants and animalsClass 8 Science :Conservation of plants and animals
Class 8 Science :Conservation of plants and animalschandkec
 
Industries
IndustriesIndustries
Industrieschandkec
 
Theoritical concept of operating system
Theoritical concept of operating systemTheoritical concept of operating system
Theoritical concept of operating systemchandkec
 
Operators and Conditional statements in C
Operators and Conditional statements in COperators and Conditional statements in C
Operators and Conditional statements in Cchandkec
 
Computer organisation ppt
Computer organisation pptComputer organisation ppt
Computer organisation pptchandkec
 
Do we need a parliament ?
Do we need a parliament ?Do we need a parliament ?
Do we need a parliament ?chandkec
 
Ch 6. combustion and flame
Ch 6. combustion and flameCh 6. combustion and flame
Ch 6. combustion and flamechandkec
 
8th standard, Geography :Ch 4. Agriculture
8th standard, Geography :Ch 4. Agriculture8th standard, Geography :Ch 4. Agriculture
8th standard, Geography :Ch 4. Agriculturechandkec
 
8th Standard Geography : Rocks and Soils
8th Standard Geography : Rocks and Soils8th Standard Geography : Rocks and Soils
8th Standard Geography : Rocks and Soilschandkec
 
Computer science introduction to C programming
Computer science introduction to C programmingComputer science introduction to C programming
Computer science introduction to C programmingchandkec
 
8th computer science ch 1
8th computer science ch 18th computer science ch 1
8th computer science ch 1chandkec
 
8th Standard, Geography: Rocks and soils 8th and soil
8th Standard, Geography: Rocks and soils 8th and soil8th Standard, Geography: Rocks and soils 8th and soil
8th Standard, Geography: Rocks and soils 8th and soilchandkec
 
Ch 6. square and squareroots
Ch 6. square and squarerootsCh 6. square and squareroots
Ch 6. square and squarerootschandkec
 
Ch 6. square and squareroots
Ch 6. square and squarerootsCh 6. square and squareroots
Ch 6. square and squarerootschandkec
 
Ch 18. pollution
Ch 18. pollutionCh 18. pollution
Ch 18. pollutionchandkec
 
NCERT_Class 8Geography 3.minerals and power resources
NCERT_Class 8Geography 3.minerals and power resourcesNCERT_Class 8Geography 3.minerals and power resources
NCERT_Class 8Geography 3.minerals and power resourceschandkec
 
Microorganism : uses
Microorganism : usesMicroorganism : uses
Microorganism : useschandkec
 
Laws of exponents and Power
Laws of exponents and PowerLaws of exponents and Power
Laws of exponents and Powerchandkec
 
Exponents and powers--Part1
Exponents and powers--Part1Exponents and powers--Part1
Exponents and powers--Part1chandkec
 
CBSE Class 8_Exponents and powers+part1
CBSE Class 8_Exponents and powers+part1CBSE Class 8_Exponents and powers+part1
CBSE Class 8_Exponents and powers+part1chandkec
 

More from chandkec (20)

Class 8 Science :Conservation of plants and animals
Class 8 Science :Conservation of plants and animalsClass 8 Science :Conservation of plants and animals
Class 8 Science :Conservation of plants and animals
 
Industries
IndustriesIndustries
Industries
 
Theoritical concept of operating system
Theoritical concept of operating systemTheoritical concept of operating system
Theoritical concept of operating system
 
Operators and Conditional statements in C
Operators and Conditional statements in COperators and Conditional statements in C
Operators and Conditional statements in C
 
Computer organisation ppt
Computer organisation pptComputer organisation ppt
Computer organisation ppt
 
Do we need a parliament ?
Do we need a parliament ?Do we need a parliament ?
Do we need a parliament ?
 
Ch 6. combustion and flame
Ch 6. combustion and flameCh 6. combustion and flame
Ch 6. combustion and flame
 
8th standard, Geography :Ch 4. Agriculture
8th standard, Geography :Ch 4. Agriculture8th standard, Geography :Ch 4. Agriculture
8th standard, Geography :Ch 4. Agriculture
 
8th Standard Geography : Rocks and Soils
8th Standard Geography : Rocks and Soils8th Standard Geography : Rocks and Soils
8th Standard Geography : Rocks and Soils
 
Computer science introduction to C programming
Computer science introduction to C programmingComputer science introduction to C programming
Computer science introduction to C programming
 
8th computer science ch 1
8th computer science ch 18th computer science ch 1
8th computer science ch 1
 
8th Standard, Geography: Rocks and soils 8th and soil
8th Standard, Geography: Rocks and soils 8th and soil8th Standard, Geography: Rocks and soils 8th and soil
8th Standard, Geography: Rocks and soils 8th and soil
 
Ch 6. square and squareroots
Ch 6. square and squarerootsCh 6. square and squareroots
Ch 6. square and squareroots
 
Ch 6. square and squareroots
Ch 6. square and squarerootsCh 6. square and squareroots
Ch 6. square and squareroots
 
Ch 18. pollution
Ch 18. pollutionCh 18. pollution
Ch 18. pollution
 
NCERT_Class 8Geography 3.minerals and power resources
NCERT_Class 8Geography 3.minerals and power resourcesNCERT_Class 8Geography 3.minerals and power resources
NCERT_Class 8Geography 3.minerals and power resources
 
Microorganism : uses
Microorganism : usesMicroorganism : uses
Microorganism : uses
 
Laws of exponents and Power
Laws of exponents and PowerLaws of exponents and Power
Laws of exponents and Power
 
Exponents and powers--Part1
Exponents and powers--Part1Exponents and powers--Part1
Exponents and powers--Part1
 
CBSE Class 8_Exponents and powers+part1
CBSE Class 8_Exponents and powers+part1CBSE Class 8_Exponents and powers+part1
CBSE Class 8_Exponents and powers+part1
 

Recently uploaded

Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
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
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
“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
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
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
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 

Recently uploaded (20)

Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
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
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
“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...
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 

Introduction to Turbo C data types

  • 1. ACE Learning Hub Erode 638 011 Mob:93600 48588 chandkec@gmail.com
  • 2. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 2 C Variables, Constants and Literals Variables In programming, a variable is a container (storage area) to hold data. To indicate the storage area, each variable should be given a unique name (identifier). Variable names are just the symbolic representation of a memory location. For example: • The value of a variable can be changed, hence the name variable • Here, playerScore is a variable of int type. • Here, the variable is assigned an integer value 95.
  • 3. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 3
  • 4. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 4 C is a strongly typed language. This means that the variable type cannot be changed once it is declared. For example:
  • 5. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 5
  • 6. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 6 For example: In C programming, octal starts with a 0, and hexadecimal starts with a 0x.
  • 7. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 7
  • 8. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 8 4. Escape Sequences
  • 9. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 9
  • 10. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 10
  • 11. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 11
  • 12. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 12 Basic types
  • 13. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 13
  • 14. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 14
  • 15. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 15
  • 16. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 16
  • 17. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 17
  • 18. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 18
  • 19. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 19
  • 20. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 20 C Output In C programming, printf() is one of the main output function. function sends formatted output to the screen. For example,
  • 21. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 21 Output
  • 22. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 22
  • 23. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 23 • To print float, we use %f format specifier. • Similarly, we use %lf to print double valu es.
  • 24. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 24
  • 25. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 25 Used %d format specifier inside the scanf() function to take int input from the user. When the user enters an integer, it is stored in the testInteger variable. Notice, that we have used &testInteger inside scanf(). It is because &testInteger gets the address of testInteger, and the value entered by the user is stored in that address. Output
  • 26. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 26
  • 27. 23/8/2021 A Chandran ACE Learning Hub Mob:93600 4588 27