30.12.20

C PROGRAM TO PRINT SIZE ,MINIMUM VALUE,MAXIMUM VALUE AND PRECISION VALUE OF THE FLOAT USING SIZEOF(),FLT_MIN,FLT_MAX AND FLT_DIG.

 

#include <stdio.h>

#include <float.h>

 

int main()

{

    float a;

printf("the min value of float is %e\n",FLT_MIN);

printf("the max value of float is %e\n",FLT_MAX);

printf("the number of digits in the number is %e\n",FLT_DIG);

printf("the size of float is %lu\n",sizeof f(a));

 

    return 0;

}

OUTPUT

the min value of float is 1.175494e-38

the max value of float is 3.402823e+38

the number of digits in the number is 3.402823e+38

the size of float is 4

No comments:

Post a Comment

JAVA program pattern 2

import java.util.Scanner; public class pattern3 { public static void main(String args[]) { int i,j; Scanner sc=new Scanner(System.in); Syste...