Why does sprintf() append a null?
Why not? According to the standard, 'A null character is written at the end of the characters written' by sprintf. - Mike
because that's the way strings work in 'C'!
My apologies. My text, "A Book on C", did not mention this. Thanks for your responses.
"My text, 'A Book on C', did not mention this" Oh dear - the null termination is absolutely fundamental to the operation of all the string-handling functions in the Standard Library!! You'll be in big trouble if it's missing...!