Well, Mick - I did hug the person to my right. May I respond now?

Quote Originally Posted by CJ1
You better read your manual more carefully and concentrate on the precision field
If you follow your link a little further "(see the How Precision Values Affect Type table)", you would see:
d, i, u, o, x, X The precision specifies the minimum number of digits to be printed. If the number of digits in the argument is less than precision, the output value is padded on the left with zeros. The value is not truncated when the number of digits exceeds precision.
Quote Originally Posted by CJ1
that is how you limit the output size.
Do you? Did you try?

Quote Originally Posted by CJ1
Sorry that is not correct, strncat (as well as the other str... functions) return a pointer to the destination (argument 1) for just that reason it can be used where the calls can be chained...
So, what is not correct?

My point, however, was that OP might believe that he would get a new string with the result of strcat() in it. (Otherwise, why would he need another variable?) That, of course, was a guess. I am ready to bet a quarter I was right, though.