标签:style blog color io ar div sp log on
1.
\r回车,光标定位到本行开头
1 #include<stdio.h> 2 3 int main(void) 4 { 5 printf("How are you ?"); 6 printf("\rI am fine\n"); 7 return 0; 8 }
输出:
I am fineou ?
2.
\b退格,将光标回退一个字符位
1 #include<stdio.h> 2 3 int main(void) 4 { 5 printf("hello, world\b\b\b\b\bpython\n"); 6 return 0; 7 }
结果:
hello, python
标签:style blog color io ar div sp log on
原文地址:http://www.cnblogs.com/lhyz/p/3959568.html