Is there a recommended way in C to tab my output so that it actually aligns with the data? I am currently using the escape sequence \t which can be viewed below.
#include <stdio.h>
int main()
{
int i;
int meatBalls[5] = {1, 2, 3, 4, 5};
printf("\tElement \t Address \t Value \n");
for(i=0; i < 5; i++) {
printf("meatBalls[%d] \t %p \t %d \n", i, &meatBalls[i], meatBalls[i]);
}
return 0;
}
This is my current output and as you can see the titles are not aligning
Element Address Value
meatBalls[0] 0x7fff547d0640 1
meatBalls[1] 0x7fff547d0644 2
meatBalls[2] 0x7fff547d0648 3
meatBalls[3] 0x7fff547d064c 4
meatBalls[4] 0x7fff547d0650 5