cpp/io/c/fprintf

Loads the data from the given locations, converts them to character string equivalents and writes the results to a variety of sinks.

@1@ Writes the results to stdout. @2@ Writes the results to a file stream. @3@ Writes the results to a character string. @4@ Writes the results to a character string. At most characters are written. The resulting character string will be terminated with a null character, unless is zero. If is zero, nothing is written and  may be a null pointer, however the return value (number of bytes that would be written not including the null terminator) is still calculated and returned.

If a call to or  causes copying to take place between objects that overlap, the behavior is undefined (e.g. )

Return value
@1-2@ Number of characters written if successful or a negative value if an error occurred.

@3@ Number of characters written if successful (not including the terminating null character) or a negative value if an error occurred.

@4@ Number of characters that would have been written for a sufficiently large buffer if successful (not including the terminating null character), or a negative value if an error occurred. Thus, the (null-terminated) output has been completely written if and only if the returned value is nonnegative and less than.