Datatype in C:: Type Storage Size Value Range
Datatype in C:: Type Storage Size Value Range
#include <stdio.h>
#include <limits.h>
int main() {
printf("Storage size for int : %d \n", sizeof(int));
return 0;
When you compile and execute the above program, it produces the
following result on Linux
Floating-Point Types
The following table provide the details of standard floating-point types with
storage sizes and value ranges and their precision
The header file float.h defines macros that allow you to use these values
and other details about the binary representation of real numbers in your
programs. The following example prints the storage space taken by a float
type and its range values
its up to the programmer to validate data for correct type and range of values.