Quote:
#include<stdio.h>
#include<conio.h>
void main()
{
float a=0.7;
if(a<0.7)
printf(" C ");
else
printf("c++");
getch();
}
this program gives output as :
C
why?
--------------------------------------------------------------

i browsed and found a answer saying
(c<0.7) 0.7 is double by default & variable c is float so the condition turns true
then it must be true for all values but if i use

c=0.8/*or 0.007 or 0.223*/
if(c<0.8/*0.007 or 0.223*/)

it prints C++


i want answer for this!!!!