Mega Code Archive
Categories
/
C
/
Structure
Get the size of a struct
#include
struct struct_type { int i; char ch; int *p; double d; } s; int main(void) { printf("s_type is %d bytes long", sizeof(struct struct_type)); return 0; }