Check it out for yourself.
"class" is not a keyword in C. A struct is basically the same thing. I do know that "class" in c++ is just a "struct" with a default of private...
Code:
#include <stdio.h>
struct A {
int a;
float b;
};
int main() {
printf("sizeof(int) = %d\n",sizeof(int));
printf("sizeof(float) = %d\n",sizeof(float));
printf("sizeof(struct A) = %d\n",sizeof(struct A));
}
I get:
sizeof(int) = 4
sizeof(float) = 4
sizeof(struct A) = 8
But those values could be different on different platforms. The trick is that usually the size of the items in the struct add up to the size of the struct itself