SlideShare a Scribd company logo
2
Most read
6
Most read
9
Most read
Basic Data Types in C++
A data type determines the type and the operations
that can be performed on the data. C++ provides
various data types and each data type is represented
differently within the computer's memory.
Classified of Basic Data Types in C++
There are many data-types available in C++.
They are classified under two categories:
Built-In or Fundamental Data types
Derived or User-Defined Data types
DATA TYPES
FUNDAMENTAL DATA
TYPES
USER DEFINED DATA
TYPES
DATA TYPE MODIFIERS
DERIVED DATA TYPES
Basic Data Types in C++
Basic Data Types in C++
 Built-in data types are the most basic data-types in C++.
 The term built-in means that they are pre-defined in C++
and can be used directly in a program.
Example:
• Character char
• Integer int
• Floating point float
• Double floating point double
 Apart from these, we also have void and bool data types.
They are composed of built-in data types.
Examples are :
array, structure, union, class, pointers etc
User-Defined Data types
User-defined data types are those which are
first declared and defined by the user before
use.
Example: struct ; union ; class; enumeration; are
User defined types
Char: Characters refer to the alphabet, numbers and other
characters (such as {, @, #, etc.) defined in the ASCII character set.
Int: Numbers without the fractional part represent integer data. In C++, the int
data type is used to store integers such as 4, 42, 5233, -32, -745.
Floating point Data Type: A floating-point data type is used to store real
numbers such as 3 .28, 64. 755765, 8.01, -24.53.
Void: The void data type is used for specifying an empty parameter list unction
and return type for a function.
Bool : The boo1data type can hold only Boolean values, that is; either true or false,
where true represents 1 and false represents 0.
Array : An array is a set of elements of the same data type that are referred to
by the same name.
Function: A function is a self-contained program segment that carries out a
pacific well-defined task.
Reference: A reference is an alternative name for a variable.
That is, a reference is an alias for a variable in a program.
11Hridoy || Roll 20 || CSE E42 || OOP || DIU

More Related Content

PPTX
Data types in c++
PPTX
Chapter 1 introduction to computers
PPTX
Data types in C
PPTX
Two dimensional arrays
PPTX
data types in C programming
PPTX
Algorithm and flowchart
PPTX
Stereoscopy
PPTX
Data types in c++
Chapter 1 introduction to computers
Data types in C
Two dimensional arrays
data types in C programming
Algorithm and flowchart
Stereoscopy

What's hot (20)

PPTX
classes and objects in C++
PPT
Class and object in C++
PPTX
Tokens in C++
PPTX
Constructor and destructor
PPTX
Functions in c++
PPTX
Union in C programming
PPTX
Pointers in c++
PPTX
PPTX
Call by value or call by reference in C++
PPTX
Pointer in c
PPTX
Nested loops
PPT
Function overloading(c++)
PDF
Introduction to c++ ppt
PPTX
07. Virtual Functions
PPTX
Functions in C
PPT
FUNCTIONS IN c++ PPT
PPTX
Pointers in C Programming
PDF
Function overloading ppt
PPT
friend function(c++)
PPTX
Structure of dbms
classes and objects in C++
Class and object in C++
Tokens in C++
Constructor and destructor
Functions in c++
Union in C programming
Pointers in c++
Call by value or call by reference in C++
Pointer in c
Nested loops
Function overloading(c++)
Introduction to c++ ppt
07. Virtual Functions
Functions in C
FUNCTIONS IN c++ PPT
Pointers in C Programming
Function overloading ppt
friend function(c++)
Structure of dbms
Ad

Viewers also liked (9)

PPTX
Data types
PPTX
Concept Of C++ Data Types
 
PPTX
Data types
PPTX
Data types
PPTX
Humming code presentation by Hridoy bepari
PPT
C++ data types
PPT
Programming In C++
PPTX
Data Types and Variables In C Programming
PPT
OOP in C++
Data types
Concept Of C++ Data Types
 
Data types
Data types
Humming code presentation by Hridoy bepari
C++ data types
Programming In C++
Data Types and Variables In C Programming
OOP in C++
Ad

Similar to Basic Data Types in C++ (20)

PPTX
Data types
PPTX
Fundamental of C Programming (Data Types)
PPT
5-Lec - Datatypes.ppt
PPTX
Data Types in C++-Primary or Built-in or Fundamental data type Derived data t...
PPTX
Datatypes in C++.pptx
PPTX
data types in c programming language in detail
PPTX
Concept of c data types
PDF
variablesfinal-170820055428 data type results
PPTX
Variables in C++, data types in c++
PPTX
Chapter 2.datatypes and operators
PPTX
DATA TYPES IN C Language.pptx
PPTX
TAPASH kumar das its my college pptasjhk
PPTX
chapter 1 Introduction to Ds and Algorithm Anyasis.pptx
PPTX
Data Types & Input/Output Streams.pptx — Description
PPT
Data Handling
PDF
C++ PPT IN NUMERICAL METHOD FOR M.Sc PHYSICS
PPTX
C data types, arrays and structs
PPTX
Data-Types-in-C-Programming.Programming.pptxProgramming.pptxpptx
PPTX
data structure & algorithm chapter1.pptx
Data types
Fundamental of C Programming (Data Types)
5-Lec - Datatypes.ppt
Data Types in C++-Primary or Built-in or Fundamental data type Derived data t...
Datatypes in C++.pptx
data types in c programming language in detail
Concept of c data types
variablesfinal-170820055428 data type results
Variables in C++, data types in c++
Chapter 2.datatypes and operators
DATA TYPES IN C Language.pptx
TAPASH kumar das its my college pptasjhk
chapter 1 Introduction to Ds and Algorithm Anyasis.pptx
Data Types & Input/Output Streams.pptx — Description
Data Handling
C++ PPT IN NUMERICAL METHOD FOR M.Sc PHYSICS
C data types, arrays and structs
Data-Types-in-C-Programming.Programming.pptxProgramming.pptxpptx
data structure & algorithm chapter1.pptx

Recently uploaded (20)

PDF
Mega Projects Data Mega Projects Data
PPTX
Computer network topology notes for revision
PPTX
Introduction to Knowledge Engineering Part 1
PPTX
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
PPTX
Moving the Public Sector (Government) to a Digital Adoption
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PPTX
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
PPTX
STUDY DESIGN details- Lt Col Maksud (21).pptx
PPT
Reliability_Chapter_ presentation 1221.5784
PPTX
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
PPTX
05. PRACTICAL GUIDE TO MICROSOFT EXCEL.pptx
PDF
.pdf is not working space design for the following data for the following dat...
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PPTX
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
PPTX
Database Infoormation System (DBIS).pptx
PDF
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
PPTX
Major-Components-ofNKJNNKNKNKNKronment.pptx
PPT
Miokarditis (Inflamasi pada Otot Jantung)
PPTX
MODULE 8 - DISASTER risk PREPAREDNESS.pptx
Mega Projects Data Mega Projects Data
Computer network topology notes for revision
Introduction to Knowledge Engineering Part 1
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
Moving the Public Sector (Government) to a Digital Adoption
Introduction-to-Cloud-ComputingFinal.pptx
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
STUDY DESIGN details- Lt Col Maksud (21).pptx
Reliability_Chapter_ presentation 1221.5784
ALIMENTARY AND BILIARY CONDITIONS 3-1.pptx
05. PRACTICAL GUIDE TO MICROSOFT EXCEL.pptx
.pdf is not working space design for the following data for the following dat...
Acceptance and paychological effects of mandatory extra coach I classes.pptx
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
Database Infoormation System (DBIS).pptx
BF and FI - Blockchain, fintech and Financial Innovation Lesson 2.pdf
Major-Components-ofNKJNNKNKNKNKronment.pptx
Miokarditis (Inflamasi pada Otot Jantung)
MODULE 8 - DISASTER risk PREPAREDNESS.pptx

Basic Data Types in C++

  • 2. A data type determines the type and the operations that can be performed on the data. C++ provides various data types and each data type is represented differently within the computer's memory.
  • 3. Classified of Basic Data Types in C++ There are many data-types available in C++. They are classified under two categories: Built-In or Fundamental Data types Derived or User-Defined Data types
  • 4. DATA TYPES FUNDAMENTAL DATA TYPES USER DEFINED DATA TYPES DATA TYPE MODIFIERS DERIVED DATA TYPES Basic Data Types in C++
  • 6.  Built-in data types are the most basic data-types in C++.  The term built-in means that they are pre-defined in C++ and can be used directly in a program. Example: • Character char • Integer int • Floating point float • Double floating point double  Apart from these, we also have void and bool data types.
  • 7. They are composed of built-in data types. Examples are : array, structure, union, class, pointers etc
  • 8. User-Defined Data types User-defined data types are those which are first declared and defined by the user before use. Example: struct ; union ; class; enumeration; are User defined types
  • 9. Char: Characters refer to the alphabet, numbers and other characters (such as {, @, #, etc.) defined in the ASCII character set. Int: Numbers without the fractional part represent integer data. In C++, the int data type is used to store integers such as 4, 42, 5233, -32, -745. Floating point Data Type: A floating-point data type is used to store real numbers such as 3 .28, 64. 755765, 8.01, -24.53. Void: The void data type is used for specifying an empty parameter list unction and return type for a function. Bool : The boo1data type can hold only Boolean values, that is; either true or false, where true represents 1 and false represents 0.
  • 10. Array : An array is a set of elements of the same data type that are referred to by the same name. Function: A function is a self-contained program segment that carries out a pacific well-defined task. Reference: A reference is an alternative name for a variable. That is, a reference is an alias for a variable in a program.
  • 11. 11Hridoy || Roll 20 || CSE E42 || OOP || DIU