When you are printing a tab character to the standard output using printf in C, it outputs some space which is apparently 4 characters in length.
That's something controlled by your terminal, not by printf.
printf simply sends a \t to the output stream (which can be a tty, a file etc), it doesn't send a number of spaces.
A tab is a tab. How many spaces it consumes is a display issue, and depends on the settings of your shell.
If you want to control the width of your data, then you could use the width sub-specifiers in the printf format string. Eg. :
printf("%5d", 2);
It's not a complete solution (if the value is longer than 5 characters, it will not be truncated), but might be ok for your needs.
If you want complete control, you'll probably have to implement it yourself.