1 st Program
#include"stdio.h"
int main()
{
float a=0.7d;
if(a<0.7)
printf("C");
else
printf("C++");
return 0;
}
This program outputs C where as the 2 nd Program
#include"stdio.h"
int main()
{
float a=0.8d;
if(a<0.8)
printf("C");
else
printf("C++");
return 0;
}
output C++
Why it is happening like this They should give the same ouput for any value of a . What is happening in the code ?
Can anybody Help me in understanding it ?