Why is percentage character not escaped with backslash in C?

c, escaping, printf, special-characters

Solution

Because the `%` is handled by `printf`. It is not a special character in C, but `printf` itself treats it differently.

Problem

The `printf()` documentation says that if someone wants to print `%` in C, he can use: ``` printf("%%") ``` Why is it not: ``` printf("\%") ``` as with other special characters?

Original source

Related problems