C Language Data type: Basic type, constructed type, pointer type, empty type.
Basic types include: integer, character, floating-point (single, double), enumeration.
The constructed types also include: arrays, structs, and common bodies.
1. Display the minimum and maximum values of int:
#include <stdio.h>
#include <limits.h>
int main(void)
{
int n1,n2;
n1 = INT_MIN;
n2 = INT_MAX;
printf("%d .. %d", n1,n2);
getchar();
return 0;
}
2. Display the minimum and maximum values for single precision type (float):
#include <stdio.h>
#include <float.h>
int main(void)
{
float f1 = FLT_MIN;
float f2 = FLT_MAX;
printf("%e .. %e\n", f1,f2);
getchar();
return 0;
}
3. Display minimum and maximum values for double:
#include <stdio.h>
#include <float.h>
int main(void)
{
double d1 = DBL_MIN;
double d2 = DBL_MAX;
printf("%e .. %e\n", d1,d2);
getchar();
return 0;
}