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.
...
-
Notifications
You must be signed in to change notification settings - Fork 0
ft_printf is a custom C implementation of printf, supporting %s, %d, and %x conversions.
deryaxacar/42-ExamRank-03
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
ft_printf is a custom C implementation of printf, supporting %s, %d, and %x conversions.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published