It might seem a dumb question but I am very confused about it. I wrote a simple program as follow:
#include<iostream>
using namespace std;
int main()
{
float a = 12.555555555555;
double b = 12.555555555555;
long double c = 12.555555555555;
cout <<a<<endl;
cout <<b<<endl;
cout <<c<<endl;
return 0;
}
Although I am using different data type with each variable but the result of output is same for all these variables and that is 12.5556. I was expecting different precision for double and long double as compared to float. I am using DevC++ IDE.