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;
}

猜你喜欢

转载自blog.csdn.net/skhhongtu/article/details/122382213