
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``red\n`, then `blue`, then `NULL`read_next_line(fd) on an empty fileNULLline_reader.cline_reader.hreadmallocfree<stdlib.h>declares malloc and free<unistd.h>declares read
Run the tests to grade your code
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``red\n`, then `blue`, then `NULL`read_next_line(fd) on an empty fileNULLline_reader.cline_reader.hreadmallocfree<stdlib.h>declares malloc and free<unistd.h>declares read
Run the tests to grade your code
Memory will appear here