Home > Back-end >  C - escape character problem
C - escape character problem

Time:10-17


Why in front of the escape character '\ t' Spaces can achieve output alignment, and do not add a space to not neat, and why can output two lines after the alignment?
Everybody, help have a look at!!!!!!
Thank you!!!!

CodePudding user response:

For terminal, \ t says only the cursor moves to the next column to the right position for 8 * n + 1 place, n for nonnegative integer

CodePudding user response:

 char s [200]; 
Sprintf (s, "a [] % 2 d=% 2 d", I, a [I]);//output to a temporary string variable s
Printf (" % 20 s, s);//s left alignment will take 20 characters width output

CodePudding user response:

https://blog.csdn.net/CSRAWD/article/details/104860862

This blog is very detailed, consult ~

CodePudding user response:

I ran across are aligned properly, it can not stick the debug the code,
  • Related