Why does printf specifier format %n not work?
问题 This is my code: #include <stdio.h> int main(void) { int n; fprintf(stdout, "Hello%n World\n", &n); fprintf(stdout, "n: %d\n", n); return 0; } This is my output: Hellon: 0 Why does the fprintf format specifier "%n" not work? Why is the string to be printed interrupted? ISO/IEC 9899:201x C11 - 7.21.6.1 - The fprintf function The conversion specifiers and their meanings are: (...) %n The argument shall be a pointer to signed integer into which is written the number of characters written to the