This project leads the path to learn about static variables and its use in C, by creating a function that returns a line red from a file descriptor [fd]. The bonus part is not much complex: is a get_next_line function that uses only one static variable and can manage multiple file descriptors at the same time.
External functions used: read()
, malloc()
& free()
.
For more information about get_next_line's Subject click here. The library and functions were written following the rules described in the 42 Norme.