Very basic, asking user to input double float amongst other data types. long double is outputed as 0.
i tried checking for logic errors, found none.
long double example;
printf("please enter a very big float\n");
scanf("%Lf",&example);
printf("your big float is %Lf",example);
i expected any float i enter to return a value, long double is 16 byte data thus can accept very large inputs. i got 0;
EDIT: i am using the IDE DEV C++, i think it uses the TDM 4.9.2 64 bit debug gcc but i am very new and have no clue. i am following an old book called c for engineers by B Bramer and S Bramer. it had to have been released prior to 1993. I hope this context helps.
#include<stdio.h>
char char_1,char_2,char_3; // 1 byte
int int_i; // 4 bytes
long int long_int_i; // 4 bytes
float float_value; // 4 bytes
double double_value; // 8 bytes
long double long_double_value; //16 bytes
int main()
{
printf("please enter a char, int and long int\n");
scanf("%c %i %li",&char_1,&int_i,&long_int_i);
printf("%c %i %li \n",char_1,int_i,long_int_i);
printf("please enter a float, double and long double \n");
scanf("%f %lf %Lf",&float_value,&double_value,&long_double_value);
printf("%f %lf %Lf",float_value,double_value,long_double_value);
}
data entered is a,10,1000 followed by output of a,10,1000 followed by data input of 10, 10.001, 10.00009 followed by ouput of 10, 10.001000, 0