#include <stdio.h>
#include <limits.h>
#include <float.h>
int main()
{
printf("Storage size for char : %d \n", sizeof(char));
printf("Storage size for int : %d \n", sizeof(int));
printf("Storage size for float : %d \n", sizeof(float));
printf("Storage size for double : %d \n", sizeof(double));
printf("Minimum float positive value: %E\n", FLT_MIN );
printf("Maximum float positive value: %E\n", FLT_MAX );
printf("Precision value: %d\n", FLT_DIG );
return 0;
}
output :
Storage size for char : 1
Storage size for int : 4
Storage size for float : 4
Storage size for double : 8
Minimum float positive value: 1.175494E-038
Maximum float positive value: 3.402823E+038
Precision value: 6
No comments:
Post a Comment
smhjifrivly@gmail.com