
Implement read_next_line, a function that reads the next text line from a file descriptor.
read_next_line(fd) on a file containing `red\nblue`Expected result
`red\n`, then `blue`, then `NULL`For your own tracking. Tests grade your code.
read_next_line(fd) on an empty fileExpected result
NULLExpected files
line_reader.cline_reader.hAllowed functions
readmallocfreeAllowed headers

v0.40: Create exercises. Challenge the community.
Meet Studio →Implement read_next_line, a function that reads the next text line from a file descriptor.
read_next_line(fd) on a file containing `red\nblue`Expected result
`red\n`, then `blue`, then `NULL`For your own tracking. Tests grade your code.
read_next_line(fd) on an empty fileExpected result
NULLExpected files
line_reader.cline_reader.hAllowed functions
readmallocfreeAllowed headers

Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.