SlideShare a Scribd company logo
DATA TYPES IN C++
DATA TYPES IN C++
BY:
 M.PAVAN
 ABDULLAH
 V.VENKAT RAMANA
 G.V.MANISH REDDY
CONTENTS
 DATA TYPE
 BUILT IN TYPE
 USER DEFINED TYPE
 DERIVED TYPE
DATA TYPE
A data type is a classification that specifies the
type of value a variable can hold.
General syntax of declaration of data type is
data_type variable_name;
Example: int a;
DATA TYPE
C++ DATA TYPES
USER-DEFINED TYPE BUILT-IN TYPE DERIVED TYPE
INTEGRAL TYPE VOID FLOATING TYPE
STRUCTURE
UNION
CLASS
ENUMERATION
ARRAY
FUNCTION
POINTER
int char float double
BUILT IN DATA TYPE
C++ DATA TYPES
BUILT-IN TYPE
INTEGRAL TYPE VOID FLOATING TYPE
int char float double
BUILT IN DATA TYPE
INTEGRAL DATA TYPE
INTEGER DATA TYPE:
Keyword: int
Storage space: two bytes
Range of int: -32768 to 32767
LONG INT
INT
SHORT INT
SOME OF THE TYPES OF
INT
BUILT IN DATA TYPE
INTEGRAL DATA TYPE
CHARACTER DATA TYPE:
Keyword: char
Storage space: 1 byte
Range of char: -128 to 127
BUILT IN DATA TYPE
FLOATING DATA TYPE
FLOAT DATA TYPE:
Keyword: float
Storage space: 4 bytes
Range of float: 3.4e-38 to 3.4e+38.
BUILT IN DATA TYPE
FLOATING DATA TYPE
DOUBLE DATA TYPE:
Keyword: double
Storage space: 8 bytes
Range of double: 1.7e-308 to 1.7e+308.
LONG DOUBLE
DOUBLE
FLOAT
FLOATING TYPES
BUILT IN DATA TYPE
VOID DATA TYPE
Type void was introduced in ansi c.
Two normal use of void:
 To specify the return type of a function when
it is not returning any value.
 To indicate an empty argument list to a
function.
 Eg:- void function-name ( void )
USER DEFINED TYPE
C++ DATA TYPES
USER-DEFINED TYPE
STRUCTURE
UNION
CLASS
ENUMERATION
USER DEFINED TYPE
STRUCTURES:
Structures are used for grouping together
elements with dissimilar types.
The general syntax of a structure:-
Struct name
{
Data_type member1;
. . . . .
};
USER DEFINED TYPE
Unions:
Unions are conceptually similar to structures
as they allow us to group together dissimilar
type elements inside a single unit.
The size of union is equal to the size of its
largest member element.
USER DEFINED TYPE
CLASSES:
The entire set of data and code of an object
can be made a user-defined data type with the
help of a classes
Once a class has been defined, we can create
any number of objects belonging to that class.
Example: fruit mango;
Will create an object mango belonging to the
class fruit.
USER DEFINED TYPE
ENUMERATED DATA TYPE:
An enumerated data type is another user
defined data type which provides a way for
attaching numbers to names.
General syntax of enumerated data type is:-
enum identifier
{
Value1,valu2,………….,Valuen
};
DERIVED TYPE
C++ DATA TYPES
DERIVED TYPE
ARRAY
FUNCTION
POINTER
DERIVED TYPE
ARRAYS:
An array is a fixed sequence collection of
elements of same data type that share a
common name.
General syntax to declare is
data_type name[size];
General syntax to initialize is
for(i=0;i<=10;i++)
cin>>a[i];
DERIVED TYPE
FUNCTIONS:
 A function is a group of statements that together
perform a task.
Every c++ program has at least one function,
which is main().
void main()
{
Statements;
}
DERIVED TYPE
POINTERS:
A pointer is a variable that holds a memory
address.
General syntax to declare pointer is:-
Data_type *pointer_name;
Example:
int *p;
SUMMARY
 Structures are used for grouping together
elements with dissimilar types.
 Unions are conceptually similar to structures as
they allow us to group together dissimilar type
elements inside a single unit.
 Once a class has been defined, we can create
any number of objects belonging to that class.
 An enumerated data type is another user
defined data type which provides a way for
attaching numbers to names.
SUMMARY
 An array is a fixed sequence collection of
elements of same data type that share a
common name.
 A function is a group of statements that
together perform a task.
 A pointer is a variable that holds a memory
address.
THANK YOU
Ad

More Related Content

What's hot (20)

Object Oriented Programming using C++(UNIT 1)
Object Oriented Programming using C++(UNIT 1)Object Oriented Programming using C++(UNIT 1)
Object Oriented Programming using C++(UNIT 1)
Dr. SURBHI SAROHA
 
Inheritance in c++
Inheritance in c++Inheritance in c++
Inheritance in c++
Vineeta Garg
 
Type casting
Type castingType casting
Type casting
Ruchika Sinha
 
Oop c++class(final).ppt
Oop c++class(final).pptOop c++class(final).ppt
Oop c++class(final).ppt
Alok Kumar
 
Tokens in C++
Tokens in C++Tokens in C++
Tokens in C++
Mahender Boda
 
Functions in c language
Functions in c language Functions in c language
Functions in c language
tanmaymodi4
 
Union in C programming
Union in C programmingUnion in C programming
Union in C programming
Kamal Acharya
 
structure and union
structure and unionstructure and union
structure and union
student
 
Constants in C Programming
Constants in C ProgrammingConstants in C Programming
Constants in C Programming
programming9
 
Type conversion
Type  conversionType  conversion
Type conversion
PreethaPreetha5
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
Ankur Pandey
 
classes and objects in C++
classes and objects in C++classes and objects in C++
classes and objects in C++
HalaiHansaika
 
C Programming: Control Structure
C Programming: Control StructureC Programming: Control Structure
C Programming: Control Structure
Sokngim Sa
 
Decision Making Statement in C ppt
Decision Making Statement in C pptDecision Making Statement in C ppt
Decision Making Statement in C ppt
MANJUTRIPATHI7
 
Structure of C++ - R.D.Sivakumar
Structure of C++ - R.D.SivakumarStructure of C++ - R.D.Sivakumar
Structure of C++ - R.D.Sivakumar
Sivakumar R D .
 
Data types in c++
Data types in c++ Data types in c++
Data types in c++
RushikeshGaikwad28
 
Functions in C
Functions in CFunctions in C
Functions in C
Kamal Acharya
 
Structures in c language
Structures in c languageStructures in c language
Structures in c language
tanmaymodi4
 
Pointers in c++
Pointers in c++Pointers in c++
Pointers in c++
sai tarlekar
 
Java Data Types
Java Data TypesJava Data Types
Java Data Types
Spotle.ai
 
Object Oriented Programming using C++(UNIT 1)
Object Oriented Programming using C++(UNIT 1)Object Oriented Programming using C++(UNIT 1)
Object Oriented Programming using C++(UNIT 1)
Dr. SURBHI SAROHA
 
Inheritance in c++
Inheritance in c++Inheritance in c++
Inheritance in c++
Vineeta Garg
 
Oop c++class(final).ppt
Oop c++class(final).pptOop c++class(final).ppt
Oop c++class(final).ppt
Alok Kumar
 
Functions in c language
Functions in c language Functions in c language
Functions in c language
tanmaymodi4
 
Union in C programming
Union in C programmingUnion in C programming
Union in C programming
Kamal Acharya
 
structure and union
structure and unionstructure and union
structure and union
student
 
Constants in C Programming
Constants in C ProgrammingConstants in C Programming
Constants in C Programming
programming9
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
Ankur Pandey
 
classes and objects in C++
classes and objects in C++classes and objects in C++
classes and objects in C++
HalaiHansaika
 
C Programming: Control Structure
C Programming: Control StructureC Programming: Control Structure
C Programming: Control Structure
Sokngim Sa
 
Decision Making Statement in C ppt
Decision Making Statement in C pptDecision Making Statement in C ppt
Decision Making Statement in C ppt
MANJUTRIPATHI7
 
Structure of C++ - R.D.Sivakumar
Structure of C++ - R.D.SivakumarStructure of C++ - R.D.Sivakumar
Structure of C++ - R.D.Sivakumar
Sivakumar R D .
 
Structures in c language
Structures in c languageStructures in c language
Structures in c language
tanmaymodi4
 
Java Data Types
Java Data TypesJava Data Types
Java Data Types
Spotle.ai
 

Viewers also liked (20)

c++ programming Unit 2 basic structure of a c++ program
c++ programming Unit 2 basic structure of a c++ programc++ programming Unit 2 basic structure of a c++ program
c++ programming Unit 2 basic structure of a c++ program
AAKASH KUMAR
 
Smartvision
SmartvisionSmartvision
Smartvision
Kalidindi Snehas Sai
 
Advanced data structures using c++ 3
Advanced data structures using c++ 3Advanced data structures using c++ 3
Advanced data structures using c++ 3
Shaili Choudhary
 
Classes and objects1
Classes and objects1Classes and objects1
Classes and objects1
Vineeta Garg
 
Constructors and destructors
Constructors and destructorsConstructors and destructors
Constructors and destructors
Vineeta Garg
 
Structured query language functions
Structured query language functionsStructured query language functions
Structured query language functions
Vineeta Garg
 
Chapter1 - Introduction to Object-Oriented Programming and Software Development
Chapter1 - Introduction to Object-Oriented Programming and Software DevelopmentChapter1 - Introduction to Object-Oriented Programming and Software Development
Chapter1 - Introduction to Object-Oriented Programming and Software Development
Eduardo Bergavera
 
Basic structure of C++ program
Basic structure of C++ programBasic structure of C++ program
Basic structure of C++ program
matiur rahman
 
Structured query language constraints
Structured query language constraintsStructured query language constraints
Structured query language constraints
Vineeta Garg
 
13. Indexing MTrees - Data Structures using C++ by Varsha Patil
13. Indexing MTrees - Data Structures using C++ by Varsha Patil13. Indexing MTrees - Data Structures using C++ by Varsha Patil
13. Indexing MTrees - Data Structures using C++ by Varsha Patil
widespreadpromotion
 
Pp
PpPp
Pp
sheraz1
 
Discrete Mathematics S. Lipschutz, M. Lipson And V. H. Patil
Discrete Mathematics S. Lipschutz, M. Lipson And V. H. PatilDiscrete Mathematics S. Lipschutz, M. Lipson And V. H. Patil
Discrete Mathematics S. Lipschutz, M. Lipson And V. H. Patil
widespreadpromotion
 
Working with Cookies in NodeJS
Working with Cookies in NodeJSWorking with Cookies in NodeJS
Working with Cookies in NodeJS
Jay Dihenkar
 
Stacks in c++
Stacks in c++Stacks in c++
Stacks in c++
Vineeta Garg
 
16. Algo analysis & Design - Data Structures using C++ by Varsha Patil
16. Algo analysis & Design - Data Structures using C++ by Varsha Patil16. Algo analysis & Design - Data Structures using C++ by Varsha Patil
16. Algo analysis & Design - Data Structures using C++ by Varsha Patil
widespreadpromotion
 
C++ data types
C++ data typesC++ data types
C++ data types
pratikborsadiya
 
Data Structure
Data StructureData Structure
Data Structure
sheraz1
 
10. Search Tree - Data Structures using C++ by Varsha Patil
10. Search Tree - Data Structures using C++ by Varsha Patil10. Search Tree - Data Structures using C++ by Varsha Patil
10. Search Tree - Data Structures using C++ by Varsha Patil
widespreadpromotion
 
Data file handling in c++
Data file handling in c++Data file handling in c++
Data file handling in c++
Vineeta Garg
 
Stacks in algorithems & data structure
Stacks in algorithems & data structureStacks in algorithems & data structure
Stacks in algorithems & data structure
faran nawaz
 
c++ programming Unit 2 basic structure of a c++ program
c++ programming Unit 2 basic structure of a c++ programc++ programming Unit 2 basic structure of a c++ program
c++ programming Unit 2 basic structure of a c++ program
AAKASH KUMAR
 
Advanced data structures using c++ 3
Advanced data structures using c++ 3Advanced data structures using c++ 3
Advanced data structures using c++ 3
Shaili Choudhary
 
Classes and objects1
Classes and objects1Classes and objects1
Classes and objects1
Vineeta Garg
 
Constructors and destructors
Constructors and destructorsConstructors and destructors
Constructors and destructors
Vineeta Garg
 
Structured query language functions
Structured query language functionsStructured query language functions
Structured query language functions
Vineeta Garg
 
Chapter1 - Introduction to Object-Oriented Programming and Software Development
Chapter1 - Introduction to Object-Oriented Programming and Software DevelopmentChapter1 - Introduction to Object-Oriented Programming and Software Development
Chapter1 - Introduction to Object-Oriented Programming and Software Development
Eduardo Bergavera
 
Basic structure of C++ program
Basic structure of C++ programBasic structure of C++ program
Basic structure of C++ program
matiur rahman
 
Structured query language constraints
Structured query language constraintsStructured query language constraints
Structured query language constraints
Vineeta Garg
 
13. Indexing MTrees - Data Structures using C++ by Varsha Patil
13. Indexing MTrees - Data Structures using C++ by Varsha Patil13. Indexing MTrees - Data Structures using C++ by Varsha Patil
13. Indexing MTrees - Data Structures using C++ by Varsha Patil
widespreadpromotion
 
Discrete Mathematics S. Lipschutz, M. Lipson And V. H. Patil
Discrete Mathematics S. Lipschutz, M. Lipson And V. H. PatilDiscrete Mathematics S. Lipschutz, M. Lipson And V. H. Patil
Discrete Mathematics S. Lipschutz, M. Lipson And V. H. Patil
widespreadpromotion
 
Working with Cookies in NodeJS
Working with Cookies in NodeJSWorking with Cookies in NodeJS
Working with Cookies in NodeJS
Jay Dihenkar
 
16. Algo analysis & Design - Data Structures using C++ by Varsha Patil
16. Algo analysis & Design - Data Structures using C++ by Varsha Patil16. Algo analysis & Design - Data Structures using C++ by Varsha Patil
16. Algo analysis & Design - Data Structures using C++ by Varsha Patil
widespreadpromotion
 
Data Structure
Data StructureData Structure
Data Structure
sheraz1
 
10. Search Tree - Data Structures using C++ by Varsha Patil
10. Search Tree - Data Structures using C++ by Varsha Patil10. Search Tree - Data Structures using C++ by Varsha Patil
10. Search Tree - Data Structures using C++ by Varsha Patil
widespreadpromotion
 
Data file handling in c++
Data file handling in c++Data file handling in c++
Data file handling in c++
Vineeta Garg
 
Stacks in algorithems & data structure
Stacks in algorithems & data structureStacks in algorithems & data structure
Stacks in algorithems & data structure
faran nawaz
 
Ad

Similar to Data types in c++ (20)

Concept Of C++ Data Types
Concept Of C++ Data TypesConcept Of C++ Data Types
Concept Of C++ Data Types
k v
 
Concept of c data types
Concept of c data typesConcept of c data types
Concept of c data types
Manisha Keim
 
Data Types in C++-Primary or Built-in or Fundamental data type Derived data t...
Data Types in C++-Primary or Built-in or Fundamental data type Derived data t...Data Types in C++-Primary or Built-in or Fundamental data type Derived data t...
Data Types in C++-Primary or Built-in or Fundamental data type Derived data t...
ssuser5610081
 
C data types, arrays and structs
C data types, arrays and structsC data types, arrays and structs
C data types, arrays and structs
Saad Sheikh
 
chapter 1 Introduction to Ds and Algorithm Anyasis.pptx
chapter 1 Introduction to Ds and Algorithm Anyasis.pptxchapter 1 Introduction to Ds and Algorithm Anyasis.pptx
chapter 1 Introduction to Ds and Algorithm Anyasis.pptx
AmrutaNavale2
 
Data types
Data typesData types
Data types
Sachin Satwaskar
 
Data type
Data typeData type
Data type
Unviersity of balochistan quetta
 
data types in c programming language in detail
data types in c programming language in detaildata types in c programming language in detail
data types in c programming language in detail
atulk4360
 
ppt on data types
ppt on data typesppt on data types
ppt on data types
GowthamReddy521498
 
13.1 User-defined data types.pptx
13.1 User-defined data types.pptx13.1 User-defined data types.pptx
13.1 User-defined data types.pptx
Sooraj Rajmohan
 
TAPASH kumar das its my college pptasjhk
TAPASH kumar das its my college pptasjhkTAPASH kumar das its my college pptasjhk
TAPASH kumar das its my college pptasjhk
destroyer7992
 
Basic C programming Language - Unit 1.pptx
Basic C programming Language - Unit 1.pptxBasic C programming Language - Unit 1.pptx
Basic C programming Language - Unit 1.pptx
Margaret Mary
 
Data structure Definitions
Data structure DefinitionsData structure Definitions
Data structure Definitions
NiveMurugan1
 
Introduction to C++
Introduction to C++Introduction to C++
Introduction to C++
Pranali Chaudhari
 
Data Handling
Data HandlingData Handling
Data Handling
Praveen M Jigajinni
 
Data types
Data typesData types
Data types
Nokesh Prabhakar
 
variablesfinal-170820055428 data type results
variablesfinal-170820055428 data type resultsvariablesfinal-170820055428 data type results
variablesfinal-170820055428 data type results
atifmugheesv
 
Variables in C++, data types in c++
Variables in C++, data types in c++Variables in C++, data types in c++
Variables in C++, data types in c++
Neeru Mittal
 
Typed data in drupal 8
Typed data in drupal 8Typed data in drupal 8
Typed data in drupal 8
Ihor Karpylenko
 
Notes(1).pptx
Notes(1).pptxNotes(1).pptx
Notes(1).pptx
InfinityWorld3
 
Concept Of C++ Data Types
Concept Of C++ Data TypesConcept Of C++ Data Types
Concept Of C++ Data Types
k v
 
Concept of c data types
Concept of c data typesConcept of c data types
Concept of c data types
Manisha Keim
 
Data Types in C++-Primary or Built-in or Fundamental data type Derived data t...
Data Types in C++-Primary or Built-in or Fundamental data type Derived data t...Data Types in C++-Primary or Built-in or Fundamental data type Derived data t...
Data Types in C++-Primary or Built-in or Fundamental data type Derived data t...
ssuser5610081
 
C data types, arrays and structs
C data types, arrays and structsC data types, arrays and structs
C data types, arrays and structs
Saad Sheikh
 
chapter 1 Introduction to Ds and Algorithm Anyasis.pptx
chapter 1 Introduction to Ds and Algorithm Anyasis.pptxchapter 1 Introduction to Ds and Algorithm Anyasis.pptx
chapter 1 Introduction to Ds and Algorithm Anyasis.pptx
AmrutaNavale2
 
data types in c programming language in detail
data types in c programming language in detaildata types in c programming language in detail
data types in c programming language in detail
atulk4360
 
13.1 User-defined data types.pptx
13.1 User-defined data types.pptx13.1 User-defined data types.pptx
13.1 User-defined data types.pptx
Sooraj Rajmohan
 
TAPASH kumar das its my college pptasjhk
TAPASH kumar das its my college pptasjhkTAPASH kumar das its my college pptasjhk
TAPASH kumar das its my college pptasjhk
destroyer7992
 
Basic C programming Language - Unit 1.pptx
Basic C programming Language - Unit 1.pptxBasic C programming Language - Unit 1.pptx
Basic C programming Language - Unit 1.pptx
Margaret Mary
 
Data structure Definitions
Data structure DefinitionsData structure Definitions
Data structure Definitions
NiveMurugan1
 
variablesfinal-170820055428 data type results
variablesfinal-170820055428 data type resultsvariablesfinal-170820055428 data type results
variablesfinal-170820055428 data type results
atifmugheesv
 
Variables in C++, data types in c++
Variables in C++, data types in c++Variables in C++, data types in c++
Variables in C++, data types in c++
Neeru Mittal
 
Ad

More from Venkata.Manish Reddy (6)

3 d secure pin (1)
3 d secure pin (1)3 d secure pin (1)
3 d secure pin (1)
Venkata.Manish Reddy
 
Quiz 1
Quiz 1Quiz 1
Quiz 1
Venkata.Manish Reddy
 
application of differential equations
application of differential equationsapplication of differential equations
application of differential equations
Venkata.Manish Reddy
 
Poster
PosterPoster
Poster
Venkata.Manish Reddy
 
Mobile communication
Mobile communicationMobile communication
Mobile communication
Venkata.Manish Reddy
 
Agriculture and farmers welfare
Agriculture and farmers welfareAgriculture and farmers welfare
Agriculture and farmers welfare
Venkata.Manish Reddy
 

Recently uploaded (20)

Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdfBiophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
PKLI-Institute of Nursing and Allied Health Sciences Lahore , Pakistan.
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 AccountingHow to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
How to Customize Your Financial Reports & Tax Reports With Odoo 17 Accounting
Celine George
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam SuccessUltimate VMware 2V0-11.25 Exam Dumps for Exam Success
Ultimate VMware 2V0-11.25 Exam Dumps for Exam Success
Mark Soia
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 

Data types in c++

  • 2. DATA TYPES IN C++ BY:  M.PAVAN  ABDULLAH  V.VENKAT RAMANA  G.V.MANISH REDDY
  • 3. CONTENTS  DATA TYPE  BUILT IN TYPE  USER DEFINED TYPE  DERIVED TYPE
  • 4. DATA TYPE A data type is a classification that specifies the type of value a variable can hold. General syntax of declaration of data type is data_type variable_name; Example: int a;
  • 5. DATA TYPE C++ DATA TYPES USER-DEFINED TYPE BUILT-IN TYPE DERIVED TYPE INTEGRAL TYPE VOID FLOATING TYPE STRUCTURE UNION CLASS ENUMERATION ARRAY FUNCTION POINTER int char float double
  • 6. BUILT IN DATA TYPE C++ DATA TYPES BUILT-IN TYPE INTEGRAL TYPE VOID FLOATING TYPE int char float double
  • 7. BUILT IN DATA TYPE INTEGRAL DATA TYPE INTEGER DATA TYPE: Keyword: int Storage space: two bytes Range of int: -32768 to 32767 LONG INT INT SHORT INT SOME OF THE TYPES OF INT
  • 8. BUILT IN DATA TYPE INTEGRAL DATA TYPE CHARACTER DATA TYPE: Keyword: char Storage space: 1 byte Range of char: -128 to 127
  • 9. BUILT IN DATA TYPE FLOATING DATA TYPE FLOAT DATA TYPE: Keyword: float Storage space: 4 bytes Range of float: 3.4e-38 to 3.4e+38.
  • 10. BUILT IN DATA TYPE FLOATING DATA TYPE DOUBLE DATA TYPE: Keyword: double Storage space: 8 bytes Range of double: 1.7e-308 to 1.7e+308. LONG DOUBLE DOUBLE FLOAT FLOATING TYPES
  • 11. BUILT IN DATA TYPE VOID DATA TYPE Type void was introduced in ansi c. Two normal use of void:  To specify the return type of a function when it is not returning any value.  To indicate an empty argument list to a function.  Eg:- void function-name ( void )
  • 12. USER DEFINED TYPE C++ DATA TYPES USER-DEFINED TYPE STRUCTURE UNION CLASS ENUMERATION
  • 13. USER DEFINED TYPE STRUCTURES: Structures are used for grouping together elements with dissimilar types. The general syntax of a structure:- Struct name { Data_type member1; . . . . . };
  • 14. USER DEFINED TYPE Unions: Unions are conceptually similar to structures as they allow us to group together dissimilar type elements inside a single unit. The size of union is equal to the size of its largest member element.
  • 15. USER DEFINED TYPE CLASSES: The entire set of data and code of an object can be made a user-defined data type with the help of a classes Once a class has been defined, we can create any number of objects belonging to that class. Example: fruit mango; Will create an object mango belonging to the class fruit.
  • 16. USER DEFINED TYPE ENUMERATED DATA TYPE: An enumerated data type is another user defined data type which provides a way for attaching numbers to names. General syntax of enumerated data type is:- enum identifier { Value1,valu2,………….,Valuen };
  • 17. DERIVED TYPE C++ DATA TYPES DERIVED TYPE ARRAY FUNCTION POINTER
  • 18. DERIVED TYPE ARRAYS: An array is a fixed sequence collection of elements of same data type that share a common name. General syntax to declare is data_type name[size]; General syntax to initialize is for(i=0;i<=10;i++) cin>>a[i];
  • 19. DERIVED TYPE FUNCTIONS:  A function is a group of statements that together perform a task. Every c++ program has at least one function, which is main(). void main() { Statements; }
  • 20. DERIVED TYPE POINTERS: A pointer is a variable that holds a memory address. General syntax to declare pointer is:- Data_type *pointer_name; Example: int *p;
  • 21. SUMMARY  Structures are used for grouping together elements with dissimilar types.  Unions are conceptually similar to structures as they allow us to group together dissimilar type elements inside a single unit.  Once a class has been defined, we can create any number of objects belonging to that class.  An enumerated data type is another user defined data type which provides a way for attaching numbers to names.
  • 22. SUMMARY  An array is a fixed sequence collection of elements of same data type that share a common name.  A function is a group of statements that together perform a task.  A pointer is a variable that holds a memory address.