Data type
Data type
The data type specifies the type of data that can be stored in variable. It also defines a set of operations
on data. Every data type have a range of values and requires different amount of memory.it is important
to specify correct data type for the variables in a program so that data can be stored correctly.
Example:
Some example of standard data type are int, float, string and char etc.
Floating point:
Floating point constants are numeric values with fraction or decimal point. Floating point
constant represent value that are measured both positive and negative floating point constant
are used in C programs the minus sign –is used for negative floating point constants if no sign is
used, the value is positive by default.
Example:
Some example of floating point constant are as follows:
50.75 10.22 -13.42
Character data type:
Any character written within single quotation mark is known as character constant. All
alphabetic characters, digits, and special symbols can be used as a character constant.
The maximum length of character constant is 1 character.
Example:
‘A’ ‘n’ ‘=’
Example:
“Pakistan” “123”
Range
It is the exponential power of 10.