ninjapiraatti / ft_printf

Do printf in C practically without any libraries.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hive Helsinki: ft_printf

Challenge

The versatility of the printf function in C represents a great exercise in programming for us. This project is of moderate difficulty. It will enable you to discover variadic functions in C in a particularly relevant context as well as learn about a great example of a basic “dispatcher” in C via the use of an array of function’s pointers.

Solution

Nothing spectacular, structs and loops.

In hindsight

I opted for writing a helper function that had to handle way too much. This caused problems both with the school's style guide and debugging as the code turned into spaghetti.

Useful materials from 42 video

http://www.java2s.com/Code/C/Function/Arrayoffunctionpointer.htm

http://man7.org/linux/man-pages/man3/stdarg.3.html

https://developer.apple.com/library/archive/qa/qa1405/_index.html

Useful materials from other students

https://www.cypress.com/file/54441/download

https://notgnoshi.github.io/printf/

http://www.cplusplus.com/reference/cstdio/printf/

http://www.pixelbeat.org/programming/gcc/format_specs.html

https://stackoverflow.com/questions/35791061/parameter-passing-with-ellipsis-in-c

https://medium.com/my-journey-at-42-silicon-valley-as-a-non-cs-major/project-4-printf-function-6396c78ac22e

http://www.firmcodes.com/write-printf-function-c/

https://medium.com/@zhang.yine/ft-printf-d95747b7aa5a

About

Do printf in C practically without any libraries.


Languages

Language:C 95.5%Language:Makefile 4.5%