Data types
Data types
are means to identify the type of data and associated operations of handling
it.
C++ data
types are of two types:
1.fundamental
types 2. Derived types
Fundamental data types: Fundamental data types are those
data types which are not composed with other data types.
There are
five fundamental data types in C++:
char , int ,
float, double, void
Derived data types: Derived data types are those data
types which are composed with fundamental data types.
There are
five derived data types in C++:
Array: An array is a collection of same
data types referenced under one name.
Function: It is an named part of a program that can be invoked from the
other parts of the program.
Pointer: A variable that holds a memory address.
Reference: An alternate name for an object.
Constant: Data item whose value cannot be
altered.
Data type modifiers:
Except type void, the basic data types may have
various modifiers preceding them.
The list of
modifiers is given below:
signed, unsigned,
long, short
User defined derived data types:
There are
some derived data types that are defined by the user.
Class,
structure , union , enumeration
Class: class is a blueprint that
represents a group of object that share some common properties and relationships.
Structure: A structure is a collection of different data types
referenced under one name.
Union: A union is a memory location that
is shared by two or more different variables.
Enumeration: Method of associating integer
constants to names.
0 Comments