DATA
TYPE:
In Computer Programming Compiler like C , C++ and Dev C++ we used different type value and
variable are use such as any name, sentence, figure and numbers data type
specifies what type of data variable or object can hold in computer program to
create program.
There are three main data types for beginners
which are,
1. Integer data type
2. Floating point data type
3. Character data type
INTEGER
DATA TYPE:
The type of data which enclose the whole number numeric. For example 1, 23, 234, 644, etc. it declare by ‘int’.
Syntax = int
variable 1, variable 2;
long int variable 1, variable 2;
int occupy one bytes means 8 bit in memory and
long int occupy 2 bytes in memory
FLOATING POINT DATA TYPE:
Another data type which consist the decimal number or numeric. For example 1.22, 45.77, 987.348 etc. are comes into float
type. It declares by ‘float’.
Syntax=
float variable 1, variable 2;
double float variable 1, variable 2;
float occupy
4 bytes and 8 bytes in memory.
CHARACTER
DATA TYPE:
Character data type consist of only a character
comes in this category which may be a number a character encoding text, it
write like ‘a’, ‘1’, ‘9’, ‘n’ etc. it declare by ‘char’.
Syntax= char
variable 1, variable 2;
Char occupy
only a byte in memory when it declares.
data type in computer |
data type ranges |
0 comments:
Post a Comment
Please do not enter any spam link in the comment box