What is the formatter to make sure that + or – signs are always shown in front of the float value in printf() in C?
I haven’t done C in a while, so where can I find a good reference on the web, any suggestions are appreciated
What is the formatter to make sure that + or – signs are always
Share
Put a
+sign after the%but before the field width, the precision specifier, or thef. For example, use"%+10.2f"for a ten character wide field with two digits after the decimal.From printf(3):