Completing a safe input loop

A text-processing function has already checked that in is a valid readable stream and has allocated a sufficiently large character array. Complete its procedure using exact C identifiers: read each chunk with , process the array only when the returned pointer differs from , and after reading stops test to determine whether the stream reports a read error.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Streams Questions: