fprintf performs formatted output like printf, but adds a stream parameter that selects where the text and converted argument values are written. section 8.4.4
Matching arguments to specifiers
fprintf(stream, "%d %u", signed_value, unsigned_value) supplies two trailing arguments for two conversion specifiers. The counts must correspond exactly. section 8.4.4
Choose format components according to the value and the intended representation:
- Use %d or %u for signed or unsigned decimal integers. section 8.4.4
- Use %b or %x for unsigned bit patterns, preferring hexadecimal for larger sets. section 8.4.4
- Use %g for general floating-point decimal output; modifiers select the corresponding argument type. section 8.4.4
int printf(char const format[static 1], ...); int fprintf(FILE* stream, char const format[static 1], ...);
The declaration makes the stream parameter and variadic trailing arguments explicit. section 8.4.4

