https://github.com/deryaxacar/examrank-03
ft_printf is a custom implementation of the standard printf function in the C language. This exam focuses on mimicking the core functionalities of printf by handling specific format conversions. The primary objective is to manage only the following conversions: %s (string), %d (decimal integer), and %x (hexadecimal integer).
https://github.com/deryaxacar/examrank-03
42 42-school 42born2code 42cursus 42exam 42exams 42projects 42school exam exam03 examrank examrank2 examrank3
Last synced: 8 months ago
JSON representation
ft_printf is a custom implementation of the standard printf function in the C language. This exam focuses on mimicking the core functionalities of printf by handling specific format conversions. The primary objective is to manage only the following conversions: %s (string), %d (decimal integer), and %x (hexadecimal integer).
- Host: GitHub
- URL: https://github.com/deryaxacar/examrank-03
- Owner: deryaxacar
- Created: 2023-12-06T12:32:22.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-21T17:28:39.000Z (8 months ago)
- Last Synced: 2025-02-21T18:29:28.198Z (8 months ago)
- Topics: 42, 42-school, 42born2code, 42cursus, 42exam, 42exams, 42projects, 42school, exam, exam03, examrank, examrank2, examrank3
- Language: C
- Homepage: https://github.com/deryaxacar/ExamRank-03
- Size: 276 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Subject
```
Assignment name : ft_printf
Expected files : ft_printf.c
Allowed functions: malloc, free, write, va_start, va_arg, va_copy, va_end
--------------------------------------------------------------------------
Write a function named `ft_printf` that will mimic the real printf but
it will manage only the following conversions: s,d and x.
Your function must be declared as follows:
int ft_printf(const char *, ... );
Before you start we advise you to read the `man 3 printf` and the `man va_arg`.
To test your program compare your results with the true printf.
Exemples of the function output:
call: ft_printf("%s\n", "toto");
out: toto$
call: ft_printf("Magic %s is %d", "number", 42);
out: Magic number is 42%
call: ft_printf("Hexadecimal for %d is %x\n", 42, 42);
out: Hexadecimal for 42 is 2a$
Obs: Your function must not have memory leaks. Moulinette will test that.
...
```
---
2025 This project was created by Derya ACAR.