Data Types in C
In the C programming language, data types are declarations for memory locations or variables that determine the characteristics of the data that may be stored and the methods (operations) of processing that are permitted involving them. The C language provides basic arithmetic types, such as integer and real number types, and syntax to build array and compound types. Several headers in the C standard library contain definitions of support types, that have additional properties, such as providing storage with an exact size, independent of the implementation.
DATA TYPES IN 'C'
Some valid and invalid declarations
Data Types | Memory Requirement | Description | |||
---|---|---|---|---|---|
int | stores a whole number | ||||
float | stores a floating point number | ||||
char | stores a character | ||||
double | Double prcession floating number | ||||
bool | stores a true or false value |
Qualifiers
The qualifiers such as signed ,unsigned, long, and short.
they can be applied to character and integer basic datatypes .
however, the qualifier long may also be applied to double.
they can be applied to character and integer basic datatypes .
however, the qualifier long may also be applied to double.
Qualifiers and their casting
Types | Memory Requirement | Range | |||
---|---|---|---|---|---|
int | -32,768 to 32,768 | ||||
char | -128 to 127 | ||||
unsigned int | 0 to 65535 | ||||
signed int | -32,768 to 32,767 | ||||
short int | -32,768 to 32,767 | ||||
unsigned short int | 0 to 65535 | ||||
signed short int | -32,768 to 32,767 | ||||
long int | -214748648 to 21477483647 | ||||
signed long int | -214748648 to 21477483647 | ||||
unsigned long int | 0 to 4294967295 | ||||
unsigned char | 0 to 255 | ||||
signed char | -128 t 127 | ||||
float | -3.4e-38 to 3.4e+38 | ||||
double | -1.7e-308 to 1.7e+308 | ||||
long double | 3.4e-4932 to 1.1e+4932 | ||||
bool | 0 t0 1 |
0 Comments
Post a Comment