What does printf return?

int. On success, the total number of characters written is returned.
On failure, a negative number is returned.

See reference here

Leave a Comment