> For the complete documentation index, see [llms.txt](https://42-guide.gitbook.io/42-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://42-guide.gitbook.io/42-guide/piscine-life/c01/ft_ft.md).

# ft\_ft

**Objective:**

Create a function that takes a pointer to an integer as a parameter and sets the value of the integer to `42`.

**Turn-in Requirements:**

* **Directory**: `ex00/`
* **File**: `ft_ft.c`
* **Allowed Functions**: None

**Prototype:**

```c
cCopyEditvoid ft_ft(int *nbr);
```

**Implementation:**

Here’s how you can implement the function:

```c
// File: ft_ft.c
#include <unistd.h> // Optional, not needed for this task but can be standard practice for headers

void ft_ft(int *nbr)
{
    *nbr = 42; // Set the value of the integer to 42
}
```

**Explanation:**

1. The function takes a single parameter: `int *nbr`.
2. The `*nbr` dereferences the pointer to access the memory it points to.
3. By assigning `42` to `*nbr`, the function modifies the value of the integer stored at the memory address provided.

**Example Usage:**

```c
cCopyEdit#include <stdio.h>
void ft_ft(int *nbr);

int main()
{
    int number = 0;
    ft_ft(&number); // Pass the address of the variable
    printf("The value of number is: %d\n", number); // Should print: The value of number is: 42
    return 0;
}
```

**Notes:**

* Ensure your code adheres to the **Norminette** coding standards.
* Avoid including unnecessary files in your directory.
* and remove or comment out main function.

[About the pointer deep instruction you can find here (pointer).](https://app.gitbook.com/o/wKHRGV4JZuhJtfJ92jQu/s/2xy0FLS2hVSRnArNrOOw/~/changes/10/all-about-c/pointers)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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-guide.gitbook.io/42-guide/piscine-life/c01/ft_ft.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.
