转义字符的长度

[[C]]

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef char STRING[];

int main()
{
    STRING str = "table\ttennis";
    printf("%s sizeof ->%d  strlen ->%d", str, sizeof(str), strlen(str));
    return 0;
}

输出的结果是 ![[result2.png]] 也就是说虽然tab的意思是四个空格,但是在这里只按一个算。