Because, in
printf
, the '%' character introduces the format specifier for outputed data:
printf("%d", myInteger);
or
printf("%s", myNullTerminatedString);
When you put "%%" in a
printf
string, you tell it to print a single '%' character.
When you put "%%%%%" it reads that as "Print '%'", then "Print '%'", then tries to find teh format specifier for the final '%' character. Since there is not further format string, it complains.