I think this is because of type mismatch. You are enforcing your program to read a floating point number in the way of reading a integer. And they have totally different format. If you have -Wall turned on, you should see a warning.
Yanan Cao On Thu, Feb 28, 2013 at 1:41 PM, Shubham Sandeep <[email protected] > wrote: > code snippet: > *int main() > { > printf ("%d\n",(float)((int)(3.5/2))); > return 0; > }* > > -- > Regards, > SHUBHAM SANDEEP > IT 3rd yr. > NIT ALD. > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
