#include <stdio.h>
#include <stdlib.h>
struct Mark {
unsigned int Pass : 1;
unsigned int A : 4;
unsigned int B : 5;
unsigned int C : 6;
};
int main(int argc, char* argv[])
{
struct Mark m = { 0 };
m.Pass = 1;
m.B = 1;
if (m.Pass)
{
printf("Pass\n");
if (m.A)
printf("A\n");
if (m.B)
printf("B\n");
if (m.C)
printf("C\n");
}
else
{
printf("Fail\n");
}
return 0;
}
Comments
Leave a comment