aboutsummaryrefslogtreecommitdiff
path: root/1-0-ft_printf/subject.en.txt
diff options
context:
space:
mode:
Diffstat (limited to '1-0-ft_printf/subject.en.txt')
-rw-r--r--1-0-ft_printf/subject.en.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/1-0-ft_printf/subject.en.txt b/1-0-ft_printf/subject.en.txt
new file mode 100644
index 0000000..f4a7861
--- /dev/null
+++ b/1-0-ft_printf/subject.en.txt
@@ -0,0 +1,33 @@
+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 with the following constraints:
+
+- It will manage only the following conversions: s,d and x
+- It will manage the minimum field width. (we will never test with a field with of 0)
+- It will manage only the precison flag `.`.
+
+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.
+
+Your function must not leak.
+
+
+Exemples of the function output:
+
+call: ft_printf("%10.2s\n", "toto");
+out: to$
+
+call: ft_printf("Magic %s is %5d", "number", 42);
+out:Magic number is 42%
+
+call: ft_printf("Hexadecimal for %d is %x\n", 42, 42);
+out:Hexadecimal for 42 is 2a$
+
+Warning: Your function must not have any leaks, this will be checked during moulinette \ No newline at end of file