https://github.com/archer-01/ft_printf
Recoding libc's printf
https://github.com/archer-01/ft_printf
c variadic-function
Last synced: 6 months ago
JSON representation
Recoding libc's printf
- Host: GitHub
- URL: https://github.com/archer-01/ft_printf
- Owner: Archer-01
- Created: 2021-12-22T09:01:14.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-06T15:59:05.000Z (about 2 years ago)
- Last Synced: 2025-04-10T03:06:32.273Z (10 months ago)
- Topics: c, variadic-function
- Language: C
- Homepage:
- Size: 15.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ft_printf
*A simple recode of libc's printf*
## Description
* ft_printf does not use buffer management like the real printf function
* It manages the following conversions: `%c`, `%s`, `%p`, `%d`, `%i`, `%u`, `%x`, `%X` and `%%`
* Like the real printf function, ft_printf returns the number of characters it printed
## Prototype
```h
int ft_printf(const char *format, ...);
```
## Usage
```sh
git clone https://github.com/Archer-01/ft_printf.git
cd ft_printf
touch main.c
```
```c
#include "ft_printf.h"
int main(void)
{
ft_printf("%s is cool! %d/100\n", "ft_printf", 100);
return (0);
}
```
```sh
make
gcc main.c -L. -lftprintf
./a.out
```
[](https://forthebadge.com)