+ Indicates that i number is printed using a sign character (+ or -). : printf sign character « printf scanf « C Tutorial






#include <stdio.h>
main()
{
    printf("%+d\n", -25);
    printf("%+d\n", 25);
}
-25
     +25








4.3.printf sign character
4.3.1.+ Indicates that i number is printed using a sign character (+ or -).
4.3.2.' ': Indicates a space for positive values so that positive values and negative values are aligned
4.3.3.Printing a space before signed values not preceded by + or -
4.3.4.Printing numbers with and without the + flag