3 ms·
If printf can write some bytes but not all of them. The C documentation is explicit: > a negative value if an output error occurred So in your case that's an
by shikoba 5y ago
If printf can write some bytes but not all of them. The C documentation is explicit:
> a negative value if an output error occurred
So in your case that's an error and printf returns a negative value. But yes, how many bytes were written is a lost information.