My implementation of printf command in C