AbdoyassrR1/printf — reverse-engineered prompt
Reverse engineered prompt
I want this repo turned into a working C version of printf. The main thing is a function called _printf that I can call like normal printf and it writes to standard output, then returns the number of characters printed.
Please keep it simple and reliable. It should handle plain text, percent signs, characters, strings, signed and unsigned numbers, and common number bases like decimal, binary, octal, and hex if that fits what’s already in the files. If width, precision, or flags are already started, finish them enough that they behave sensibly, but don’t overcomplicate it.
Clean up the existing code, remove any leftover compiled output, make sure the header is consistent, and add a small main file with examples so I can test it quickly. I’d also like it to compile cleanly with gcc and not crash on null strings or weird format input.
Want more depth? Deep Reverse