What value does read() return when it has reached the end of a file?

Q

What value does read() return when it has reached the end of a file?

✍: Guest

A

The read() method returns -1 when it has reached the end of a file.

2012-11-05, 2274👍, 0💬