哦,这个问题经典
回复 9楼 星辰雁
不明白,同时退格,位置应该不变吧[ 本帖最后由 jianyuling00 于 2012-3-19 00:59 编辑 ]
2012-03-19 00:50
2012-03-19 00:53

2012-03-19 01:25
程序代码:
#include <stdio.h>
#include <conio.h>
void main(void)
{
printf_s("01234567890123456789\n");
//printf_s("\t");
//_getch();
printf_s(" ");
_getch();
printf_s("\b");
_getch();
printf_s("1");
_getch();
printf_s("\b");
_getch();
printf_s("5");
_getch();
}

2012-03-19 01:30
程序代码:
#include <stdio.h>
#include <conio.h>
void main(void)
{
const char str[] = "\t \b1\b5";
const char* p = str;
puts("12345678901234567890");
printf_s("%s\n", str);
//puts(str);
while (*p)
{
//printf_s("%c", *p);
putchar(*p);
//_putch(*p);
++p;
}
_getch();
}

2012-03-19 01:49

2012-03-19 02:00

2012-03-19 17:54

2012-03-19 18:09
2012-03-19 19:12
真是怪事儿,全部拆开了输出就只有一个“5”了。
2012-03-19 22:03