I' trying to convert hexadecimal to binary, I'm using itoa and it seems to be working right, the problem is that it skip every zero at the left of the first one. Is there any way to force it to write this zeros?
if str2="f" everything is Ok, it prints 1111Code:
printf("%s ", itoa(str2 , str, 2) );
if str2="2" it prints only 10, I would like to print 0010
Thanks in advance