# get\_next\_line

This project is about programming a function that returns a line read from a file descriptor.

This project will not only allow you to add a very convenient function to your collection, but it will also make you learn a highly interesting new concept in C programming: **static variables.**

Before starting, we recommend you to watch the video below to better understand the subject. It's in french but you can add english subtitles.

{% embed url="<https://www.youtube.com/watch?v=-Mt2FdJjVno>" %}

*The video lasts 20 minutes but it will be the most worthwhile minutes of your life ;)*

Well, now that you have an overview of what we ask you to do, let's get started :)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://42-cursus.gitbook.io/guide/1-rank-01/get_next_line.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
