Liste des Groupes | Revenir à cl c |
On Mon 2/10/2025 5:03 PM, Lawrence D'Oliveiro wrote:... and non-null pointer (pointer to the buffer) is returned.On Mon, 10 Feb 2025 13:58:05 -0500, James Kuyper wrote:If by that you mean, "what if the value of 1 is passed as second argument", then, as I stated in one of my previous messages:
>I don't see the contradiction. If "no characters are read into the>
array", there is no such thing as "the last byte read into the array",
so a null byte has no location where it should be written. Therefore,
there's no reason for changing the contents of the array.
What if the array is only big enough for one byte? In this case, no
characters can be read into it. Is a trailing null inserted in this case?
No attempt to read anything from the stream is made, which means that end-of-file or I/O error conditions do not arise (unless, perhaps, the stream was already in error condition) and the [0] byte of the buffer is simply set to '\0'.
Les messages affichés proviennent d'usenet.