C sizeof()

sizeof(data type)

//sizeof(date_type)
int test_sizet(void) {
    _Bool check;
    char T0;
    int  T1;
    short T2;
    long  T3;
    float T4;
    double T5;
    wchar_t T6;
    printf("_Bool:%d\nchar:%d;\nint:%d;\nshort:%d;\nlong:%d\nfloat:%d\ndouble:%d\nwchar_t:%d\n", sizeof(_Bool),
     sizeof(char), sizeof(int), sizeof(short), sizeof(long), sizeof(float), sizeof(double), sizeof(wchar_t));
    return SUCCESS;
}
上一篇:python - 数据类型


下一篇:C++函数中参数的使用及函数的重载