As far as I have understood.. Its basically that once you give the input to t as float, that value is displayed for all the printf functions except one because of the %f modifier.. the %f modifier cannot accept x (int) as a successful argument so it takes the latest float value.. but in case of x=30; printf("%d\n",x); this printf has %d as modifier so the output is 30.
say t entered is 43.5 so OUTPUT: (as per gcc compiler) 43.5 43.5 43.5 30 43.5 43.5 correct me if im wrong.. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@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.