Try the following statement in your program and see the interesting thing:
*******************************************************
printf("%*.*f%n",2,4,floatvar,&var); //*.* 2.4digits & total No of Digits which was Printed stored at var.
Ex:
===
Value of variable float floatvar = 165.12345
2,4 specified in the printf format string will print the float as 165.1235
the variable var is :8(Including With spaces & dots & tabs & Newline)
The meaning is, var will store the number of characters printed...
[NOTE: See &var not var]
Thursday, January 7, 2010
Subscribe to:
Post Comments (Atom)
salam sahabat
ReplyDeletestoring value in variable its good posting make me know more ..ehm dah saya follow n follow baliknya dah belum thnx sn good luck ya
your info is nice!
ReplyDeletethanks for sharing