> 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/c04.md).

# C04

Welcome to the **C Piscine - C 04** subject! This unit is designed to help you strengthen your foundational skills in C programming, with a focus on **string manipulation**, **number handling**, and **base conversions**. The exercises in this subject will challenge you to write efficient and clean code while adhering to strict coding standards.

**Key Topics Covered:**

1. **String Functions**:
   * Counting characters in a string (`ft_strlen`).
   * Displaying strings to the standard output (`ft_putstr`).
   * Converting strings to integers (`ft_atoi`).
2. **Number Functions**:
   * Displaying integers (`ft_putnbr`).
   * Displaying numbers in different base systems (`ft_putnbr_base`).
   * Converting strings in specific bases to integers (`ft_atoi_base`).
3. **Input/Output**:
   * Using the `write` function to display output.
   * Handling edge cases and invalid inputs.
4. **Coding Standards**:
   * Adhering to the **norminette** guidelines for code formatting and structure.
   * Writing clean, readable, and efficient code.

**Why This Subject Matters:**

* **String Manipulation**: Strings are fundamental in programming, and understanding how to work with them is crucial for tasks like parsing input, processing text, and more.
* **Number Handling**: Working with numbers, especially in different bases, is essential for low-level programming, data representation, and algorithm design.
* **Coding Standards**: Writing code that adheres to strict standards ensures readability, maintainability, and compatibility with automated grading tools like **Moulinette**.

**Tools You’ll Use:**

* **Moulinette**: An automated grading system that checks your code for correctness and adherence to the norm.
* **Norminette**: A tool that enforces coding standards, ensuring your code is clean and well-formatted.

**How to Approach This Subject:**

1. **Read the Instructions Carefully**: Each exercise has specific requirements. Make sure you understand them before starting.
2. **Test Your Code**: Use test cases to ensure your functions handle all edge cases (e.g., empty strings, negative numbers, invalid inputs).
3. **Follow the Norm**: Run your code through **norminette** to ensure it meets the required standards.
4. **Ask for Help**: If you’re stuck, don’t hesitate to ask your peers or refer to online resources.


---

# 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/c04.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.
