当前位置: C语言 -- 标准库 -- <time.h> -- size_t

size_t类型


描述:

该类型是表示sizeof运算符运算结果的无符号整数类型。


范例:
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
/*类型size_t范例*/

#include <stdio.h>
#include <time.h>

int main(void)
{
    size_t length;
    length = sizeof(struct tm);
    printf("Length of struct tm type: %zu\n", length);

    return 0;
}


输出:

Length of struct tm type: 36


相关内容:
clock_t 表示使用处理器时间的实数类型。
time_t 表示日历时间的实数类型。