Mentioning %n without explaining that it is overwhelmingly used for exploits is a little reckless IMO.
#include <stdio.h>
int main(void) {
int count;
printf("%s%n\n", "hello, world", &count);
printf("count = %d\n", count);
}
The output is: hello, world
count = 12
%n can be exploited to write data to an arbitrary memory location, but only if the format string is something other than a string literal.%n can be exploited, but it's entirely possible to use it safely.
I've never tested to see if printf("%s", str) becomes the equivalent fputs(str, stdout)