(Screenshot)
The aim of this project is to create a function that reads a line until a newline is found, from the file descriptor.
This project also introduces the concept of static variables in C programming.
- Allowed functions:
malloc
,free
,read
- All heap allocated memory space must be properly freed when necessary
- Using libft is not allowed for this project
Run the following commands
$ git clone https://github.com/rvan-duy/get_next_line.git
$ cd get_next_line
$ gcc -D BUFFER_SIZE=128 get_next_line.c get_next_line_utils.c
$ ./a.out
(Screenshot)