The result of "printf" is the number of characters written. If a write error occurs, "printf" returns a negative number. (ANSI standard)
Even wikipedia has a whole article about printf, where you can find the different return values for different languages and times.