Google Search

Saturday, October 24, 2015

get double error and warnings in c

#include <stdio.h>
 int main(void) {
double f = 5000000000.0;  //double precision constant created because of “.”
double g = 5000000000; //constant is integer or long integer but 2,147,483,647 is the maximum!
printf("f=%lf\n", f);
printf("g=%lf\n", g);
return 0;
}

o/p:

f=5000000000.000000
 g=705032704.000000 // OVERFLOW

No comments:

Post a Comment