It's painful to see printf being accused for the (un) expected output......The declaration of printf means that any data type can be passed to it as argument.Inherently what printf does is print the bytes in meaningful form according to the first argument which is a string.So its impossible for printf to typecast arguments once they are passed they appear the same way to printf...*A stream of bits from which it has to extract the valid info.*Its the responsibility of the programmer to pass the right data type with right format specifier...Just to complete my answer http://www.ideone.com/CNkCo . Saurabh Singh B.Tech (Computer Science) MNNIT blog:geekinessthecoolway.blogspot.com
On Tue, Jan 10, 2012 at 2:29 PM, Rahul Verma <rahulverma....@gmail.com>wrote: > @amol this is not the behaviour of printf, its totally about the > typecasting > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/algogeeks/-/GPVlt15S3V0J. > > 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.