Data can be of
many types e.g. characters, integers, real, string etc. Anything enclosed in quotes
represents characters data types in C++. Numbers without fraction represents integer’s
data. Numbers with fractions represent real data and anything enclosed in
double quotes represents a string. Since the data to be dealt with are of many
types, a programming language must provide ways and facilitate to handle all
types of data.
Definition of Data Type
Data Types are means to identify the type of data and associated
operation of handling it.
|
C++ like any other
language provides ways and facilitates to handle different types of data by
providing data types.
C++ data types are
of two types:
Fundamental Types
There are five
fundamental data types in C++: Char, int, float, double and void that represent
characters, integer, floating-point, double floating point and valueless data
representation.
Derived Types
Derived Types construct from the fundamental
Types are: Array, functions, pointers, references, constant, classes, structures,
unions and enumerations.
0 comments:
Post a Comment