Monday, December 20, 2010

Printf: The big crutch

The last time I combed through the online pages for printf format specifiers, it was to learn, incredibly enough, that the number of digits printed in the exponent factor for %f and even %g cannot be specified. Depending on the system, it's either always two or three digits (sadly, it's three for my windows C++ displays). Anyhow, here are a couple of super nice and complete descriptions of all the format specifiers:

Of course, cplusplus.com:

http://www.cplusplus.com/reference/clibrary/cstdio/printf/

and also of course, wikipedia:

http://en.wikipedia.org/wiki/Printf

here is a nice copy of the man page, I guess:

http://www.thinkage.ca/english/gcos/expl/c/lib/printf.html

and here is one with examples:

http://www.friedspace.com/cprogramming/outputformats.php