How to return a double correctly?
Here is the code:
Code:
#include <stdio.h>
main()
{
int integer_var = 100;
float floating_var = 331.79;
double double_var = 8.44e+11;
char char_var = 'W';
printf("integer_var = %i\n", integer_var);
printf("floating_var = %f\n", floating_var);
printf("double_var = e\n", double_var);
printf("char_var = %c\n", char_var);
return 0;
}
And it returns:
integer_var = 100
floating_var = 331.790009
double_var = e
char_var = W
Why is the double not getting outputted correctly?