Data is a one of the most commonly used terms in programming.Data can be defined as the raw information input to the computer.Data is differentiated into various types in C.There are three numeric data types that comprise the fundamental or primary data types are:
they are also called as pre define primitives associated with C compiler.The C compiler knws about these types and the operations that can be performed on the values of these types.The following are the declaration statements of variables of different types:
We know already that an integer is a whole number, a float is areal number and a character is represented within single quotes.
eg:
1 is an integer (whole number)
1.0 is areal number (floating point number)
'1' is a character constant
"1" is a string literal
The data types associated with a string literal is char*(character pointer )
An integer requires 2 bytes of memory to store its value, a float requires 4 bytes of memory and a character requires 1 byte of memory
- int,
- float and
- char.
they are also called as pre define primitives associated with C compiler.The C compiler knws about these types and the operations that can be performed on the values of these types.The following are the declaration statements of variables of different types:
- int x;
- float f;
- char ch;
We know already that an integer is a whole number, a float is areal number and a character is represented within single quotes.
eg:
1 is an integer (whole number)
1.0 is areal number (floating point number)
'1' is a character constant
"1" is a string literal
The data types associated with a string literal is char*(character pointer )
An integer requires 2 bytes of memory to store its value, a float requires 4 bytes of memory and a character requires 1 byte of memory
No comments:
Post a Comment