it doesn't accept the new line as a line terminator.
if the statement succeeds, it sets ERRNO to 0. otherwise, it sets ERRNO to -1.