It is printf
giving the warning, scape the modulus character with another modulus:
printf("\n a%%b = %i\n",a%b);
As you may see in the manual: printf(3) there's no b
flag character, so when printf
find your %b
in your string it doesn't know what to do. Since you don't want any formatting in that case, just include the %
character in your string, you just need to scape the %
character with another %
character as in the example above.