"a < 0.08f" will make it compare to float. by default 0.08 is considered as double.
On Sun, May 29, 2011 at 9:51 PM, Ankit Agarwal <ankitgeniu...@gmail.com> wrote: > #include<stdio.h> > > int main(void) > { > float a=0.08; > if(a<0.08) > printf("Hello\n"); > else > printf("Hii\n"); > return 0; > } > > The o/p is: Hello why???? > > -- > Ankit Agarwal > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.