i have written the below code in C language.
#include <stdio.h>
#include <limits.h>
#include <float.h>
int main(void) {
printf("Long Double range: %lf, %lf\n", LDBL_MIN, LDBL_MAX);
}
when I compile it (with gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008), it shows the below warning!!!
warning: format ‘%lf’ expects argument of type ‘double’, but argument 2 has type ‘long double’
how can i resolve this warning? i have used also %le
and %lg
, but warning resists!