Re:C Strings and my slow descent to madness
by nwellnhof on Thursday April 06, 2023 @10:32AM
(#35468792)
Yes, it is. From the C11 spec:
> Characters from the array are written up to (but not including) the terminating null character. If the precision is specified, no more than that many bytes are written. If the precision is not specified or is greater than the size of the array, the array shall contain a null character.
> Characters from the array are written up to (but not including) the terminating null character. If the precision is specified, no more than that many bytes are written. If the precision is not specified or is greater than the size of the array, the array shall contain a null character.