decfsl decfsl - 6 months ago 19
C Question

Why the first \t doesn't work?

#include "stdio.h"
int main()
int toes = 10;
return 0;

//This is an exercise from c primer plus. After compiling and running, only the second \t works.


It works fine for me. (example)


toes=10 2toes=20        toes2=100

Note that \t means "tabulate", or in other words to pad to the nearest multiple of N position, where N is usually 8.

toes=10 takes up 7 characters, so to reach the next multiple of 8 would require printing 1 space.