关于 printf输出问题
printf("\tfirst\b\b\bsh\\\r\'No.1\'"); 我看教程上的举例没给答案 我自己算的应该是输出结果应该是'No.1' fish\吧电脑上怎么显示的只有'No.1' 呢?
程序代码:
#include <cstdio>
#include <cstring>
#include <conio.h>
void main(void)
{
const char str[] = "\tfirst\b\b\bsh\\\r\'No.1\'";
printf_s("strlen(str) = %u\n", strlen(str));
for (int index = 0; index < 20; ++index)
{
_putch('0' + index % 10);
}
_putch('\n');
const char* p = str;
while (*p != '\0')
{
_getch();
_putch(*p++);
}
_getch();
}
