The problem of bit Domain in C language

-sharpinclude <stdio.h>

struct{
    unsigned int widthValidated;
    unsigned int heightValidated;
}status1;

struct{
    unsigned int widthValidated : 1;
    unsigned int heightValidated : 1;
}status2;

int main(void){
    printf("Memory size occupied by status1 is : %d.\n",sizeof(status1));
    printf("Memory size occupied by status2 is : %d.\n",sizeof(status2));
    getchar();
    return 0;
}

the problem has been solved!

C cPP
Mar.10,2021
The

problem has been resolved.

Menu