I think when the mismatch of the format specifier and the variable occurs , the compiler generates random number output as, some garbage I suppose .
On Sat, Jul 23, 2011 at 12:30 AM, geek forgeek <[email protected]>wrote: > #include<stdio.h> > void main() > { > int x; > float t; > scanf("%f",&t); > printf("%f\n",t); > x=90; > printf("%f\n",x); > { > x=1; > printf("%f\n",x); > { > x=30; > printf("%f\n",x); > } > printf("%f\n",x); > } > x==9; > printf("%f\n",x); > } > > input > 1.1 > > output > 1.100000 > 1.099999 > 1.099999 > 1.099999 > 1.099999 > 1.099999 > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Regards Rajeev N B <http://www.opensourcemania.co.cc> -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
