Data Handling
Data can be of many types e.g. character, integer, real, string, etc.
* Anything enclosed in single quotes represents character data.
Example:
‘A’ , ‘x’ , ‘2’
* Numbers without fractions represent integer data.
Example:
23 , 45 , 76 , 876
* Numbers with fractions represent real data(float)
Example:
34.65 , 23.76 , 34.87 , 23.4e3 , 24.6e-3 , 12.5E2
* Anything enclosed within double quotes represents a string or character array.
Example:
“hello” , “hi” , “hello1233” , “12245” , “a”
C++ like any other language provides ways and facilities to handle different types of data by providing data types.
C++ data types
Data types are a means to identify the type of data and associated operations for handling it.
C++ data types are of two types.
(i). fundamental types
(ii). Derived types