SlideShare a Scribd company logo
DATA TYPES
Data type is defined as a set of
values and a set of operations.
For example, the set of all integer
(whole) numbers constitutes a set of
values.
This set of numbers, however, doesn’t
constitute a data type until a set of
operations is included.
These operations, of course, are the
familiar mathematical and comparison
operations. The combination of a set of
values plus operations results in a true
data type.
A class data type (referred to as a
“class,” for short) is a programmer-
created data type.
A built-in data type is provided as an
integral part of the programming
language. Built-in data types are also
referred to as primitive types.
Data Types
Data Types
Data Types
A literal value means the value
identifies itself or constant.
For example, all numbers, such as 2,
3.6, and -8.2, are referred to as literal
values because they literally display
their values.
Text, such as “Hello World!”, is also
referred to as a literal value because
the text itself is displayed.
Integer Data Types
C++ provides nine built-in integer
data types
The int Data Type The values
supported by the int data type are
whole numbers, which are
mathematically known as
integers.
Integer Data Types
An integer value consists of digits
only and can optionally be
preceded by a plus (+) or minus (-)
sign. Therefore, an integer value
can be the number 0 or any
positive or negative number
without a decimal point.
Integer Data Types
The following are the examples of
valid integers
Integer Data Types
Examples show, integers can contain an
explicit sign. However, no commas, decimal
points, or special symbols, such as the dollar
sign are not allowed, as in these examples of
invalid integers:
The Escape Character
() has a special meaning in C++ as the
escape character. When a backslash is
placed in front of a group of characters, it
tells the compiler to escape from the way
these characters are normally interpreted.
Data Types

More Related Content

PPT
3 data-types-in-c
PPTX
Datatype in c++ unit 3 -topic 2
PPTX
Constant, variables, data types
PPTX
Constants and variables in c programming
PPT
constants, variables and datatypes in C
PPT
Data types and Operators
PPTX
Data Type in C Programming
PPTX
Data types in C
3 data-types-in-c
Datatype in c++ unit 3 -topic 2
Constant, variables, data types
Constants and variables in c programming
constants, variables and datatypes in C
Data types and Operators
Data Type in C Programming
Data types in C

What's hot (20)

PPTX
R data types
PPTX
Data types
PPTX
Numeric Data Types & Strings
PPTX
Concept Of C++ Data Types
 
PPTX
Concept of c data types
PPTX
Data types in C language
PPTX
R Datatypes
PPTX
Fundamental of C Programming (Data Types)
PPTX
C# Value Data Types and Reference Data Types
PDF
Learn C# Programming - Data Types & Type Conversion
PPTX
Basic Data Types in C++
PPT
C++ data types
PPTX
data types in C programming
PPTX
C data types, arrays and structs
PPTX
Data types
PPTX
Data Types and Variables In C Programming
PPTX
Numerical data.
PPT
Primitive data types
PPTX
Data Types - Premetive and Non Premetive
R data types
Data types
Numeric Data Types & Strings
Concept Of C++ Data Types
 
Concept of c data types
Data types in C language
R Datatypes
Fundamental of C Programming (Data Types)
C# Value Data Types and Reference Data Types
Learn C# Programming - Data Types & Type Conversion
Basic Data Types in C++
C++ data types
data types in C programming
C data types, arrays and structs
Data types
Data Types and Variables In C Programming
Numerical data.
Primitive data types
Data Types - Premetive and Non Premetive
Ad

Viewers also liked (20)

PDF
How to Install java JRE and JDK - STEP 1
PPTX
18.2 Product vs Period costs
DOCX
human resources for project management
PPT
Electromagnetic Waves
ODP
Geometrie 3 Thales
PPTX
Ahmed Ibrahim
PDF
1 parcial
PDF
HK4As AdSchool Digital Bootcamp Part 2 20130506
PPTX
Done For You SEO PPC PowerPoint
TXT
Mm consultant profile
PDF
PRMG certificate
PDF
Dnb buyer persona-guide
PDF
Eui repair kits 2016
PDF
Us mobile app report
PDF
Team culture code: building a modern marketing team
PPTX
Digital Transformation How to Reboot IT and Business Collaboration
PDF
My immortal evanescence piano sheet music
PPTX
Data types
PDF
Introduction to Apache Beam
How to Install java JRE and JDK - STEP 1
18.2 Product vs Period costs
human resources for project management
Electromagnetic Waves
Geometrie 3 Thales
Ahmed Ibrahim
1 parcial
HK4As AdSchool Digital Bootcamp Part 2 20130506
Done For You SEO PPC PowerPoint
Mm consultant profile
PRMG certificate
Dnb buyer persona-guide
Eui repair kits 2016
Us mobile app report
Team culture code: building a modern marketing team
Digital Transformation How to Reboot IT and Business Collaboration
My immortal evanescence piano sheet music
Data types
Introduction to Apache Beam
Ad

Similar to Data Types (20)

PDF
PPTX
PROGRAMMING IN C- Data Types.pptx
DOCX
Primitive data types
PPT
C language Unit 2 Slides, UPTU C language
PDF
Cpprm
PDF
Constants Variables Datatypes by Mrs. Sowmya Jyothi
PPTX
Module 1:Introduction
PPTX
Lecture 2
PDF
03 expressions.ppt
PPTX
Introduction to C language programming.pptx
PPTX
C Programming Lecture 3 - Elements of C.pptx
PDF
2 1. variables & data types
PDF
Basic data structure DATA STRUCTURE ALGORITHM
PPTX
Data Types in C language
PDF
INTRODUCTION TO C PROGRAMMING in basic c language
PPTX
Structure of c_program_to_input_output
PDF
C++ PPT IN NUMERICAL METHOD FOR M.Sc PHYSICS
PPT
Unit 1 Built in Data types in C language.ppt
ODP
CProgrammingTutorial
PPT
FP 201 Unit 2 - Part 2
PROGRAMMING IN C- Data Types.pptx
Primitive data types
C language Unit 2 Slides, UPTU C language
Cpprm
Constants Variables Datatypes by Mrs. Sowmya Jyothi
Module 1:Introduction
Lecture 2
03 expressions.ppt
Introduction to C language programming.pptx
C Programming Lecture 3 - Elements of C.pptx
2 1. variables & data types
Basic data structure DATA STRUCTURE ALGORITHM
Data Types in C language
INTRODUCTION TO C PROGRAMMING in basic c language
Structure of c_program_to_input_output
C++ PPT IN NUMERICAL METHOD FOR M.Sc PHYSICS
Unit 1 Built in Data types in C language.ppt
CProgrammingTutorial
FP 201 Unit 2 - Part 2

More from Nicole Ynne Estabillo (14)

PPT
Sound and Waves
PPT
Mirrors and Reflections
PPT
Electromagnetic Spectrum
PPTX
Mathematics 10 (Quarter Two)
PDF
Ekonomiks 10 (Unit Two)
PPTX
Software Development
PPTX
Operator Precedence and Associativity
PPTX
Operands (Modulo)
PPTX
More on Data Types (Exponential and Scientific Notations)
PPTX
Common Programming Errors
PPTX
Activities on Software Development
PPTX
Activities on Operator Precedence and Associativity
PPTX
Activities on Exponential and Scientific Expressions
PPTX
Activities on Operands
Sound and Waves
Mirrors and Reflections
Electromagnetic Spectrum
Mathematics 10 (Quarter Two)
Ekonomiks 10 (Unit Two)
Software Development
Operator Precedence and Associativity
Operands (Modulo)
More on Data Types (Exponential and Scientific Notations)
Common Programming Errors
Activities on Software Development
Activities on Operator Precedence and Associativity
Activities on Exponential and Scientific Expressions
Activities on Operands

Recently uploaded (20)

PPTX
Cell Structure & Organelles in detailed.
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PPTX
master seminar digital applications in india
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
RMMM.pdf make it easy to upload and study
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Pre independence Education in Inndia.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
Cell Structure & Organelles in detailed.
Anesthesia in Laparoscopic Surgery in India
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
master seminar digital applications in india
Microbial disease of the cardiovascular and lymphatic systems
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
TR - Agricultural Crops Production NC III.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Renaissance Architecture: A Journey from Faith to Humanism
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
RMMM.pdf make it easy to upload and study
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Microbial diseases, their pathogenesis and prophylaxis
O7-L3 Supply Chain Operations - ICLT Program
2.FourierTransform-ShortQuestionswithAnswers.pdf
Pre independence Education in Inndia.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?

Data Types

  • 2. Data type is defined as a set of values and a set of operations. For example, the set of all integer (whole) numbers constitutes a set of values.
  • 3. This set of numbers, however, doesn’t constitute a data type until a set of operations is included. These operations, of course, are the familiar mathematical and comparison operations. The combination of a set of values plus operations results in a true data type.
  • 4. A class data type (referred to as a “class,” for short) is a programmer- created data type. A built-in data type is provided as an integral part of the programming language. Built-in data types are also referred to as primitive types.
  • 8. A literal value means the value identifies itself or constant. For example, all numbers, such as 2, 3.6, and -8.2, are referred to as literal values because they literally display their values.
  • 9. Text, such as “Hello World!”, is also referred to as a literal value because the text itself is displayed.
  • 10. Integer Data Types C++ provides nine built-in integer data types The int Data Type The values supported by the int data type are whole numbers, which are mathematically known as integers.
  • 11. Integer Data Types An integer value consists of digits only and can optionally be preceded by a plus (+) or minus (-) sign. Therefore, an integer value can be the number 0 or any positive or negative number without a decimal point.
  • 12. Integer Data Types The following are the examples of valid integers
  • 13. Integer Data Types Examples show, integers can contain an explicit sign. However, no commas, decimal points, or special symbols, such as the dollar sign are not allowed, as in these examples of invalid integers:
  • 14. The Escape Character () has a special meaning in C++ as the escape character. When a backslash is placed in front of a group of characters, it tells the compiler to escape from the way these characters are normally interpreted.