An open API service indexing awesome lists of open source software.

https://github.com/semx2a/ft_printf

Reverse engineering printf
https://github.com/semx2a/ft_printf

c library makefile reverse-engineering

Last synced: about 1 year ago
JSON representation

Reverse engineering printf

Awesome Lists containing this project

README

          

# ft_printf

## Summary
The goal of this project is to retro-engineer the `printf()` function in C, providing a deep understanding of variadic functions in C.

## Git Repository Contents

- `Makefile`: Script for compiling source files with necessary flags.
- `*.h` : Header files containing function prototypes.
- `*.c` : Source files implementing the `ft_printf()` function and any additional features.

## Acquired Skills

### C Programming

- Implementation of a complex function (`ft_printf()`) in C.
- Adherence to the `School 42` C coding standard.
- Handling of variadic functions.
- Unit testing.

### Memory Management

- Dynamic memory allocation and deallocation.
- Prevention of memory leaks through proper memory management.

### String Formatting

- Usage of external functions: `write`, `va_start`, `va_arg`, `va_copy`, `va_end`.
- Mimicking the behavior of the original `printf()` function.
- Handling conversions such as `%c`, `%s`, `%p`, `%d`, `%i`, `%u`, `%x`, `%X`, `%%`.