I am a beginner, just learning C; I am trying to print a 'double long' variable. When I try to run the program, It produces incorrect output! Here is the code:
#include<stdio.h>
int main()
{
double long x=10;
printf("%.Lf",x);
return 0;
}
/*
Output:
-0
Output in online compiler:
10
*/
I use vs code with gcc. When I try to run the program, it displays wrong value. I tried using an online compiler, It works fine. Here is the online compiler I used: https://rextester.com/l/c_online_compiler_gcc
Thanks.
edit: I tried using %Lf instead of %.Lf, but still the output is -0.000000