fork(20) download
  1. #include <stdio.h>
  2. #include <stddef.h>
  3.  
  4. struct Test
  5. {
  6. char c;
  7. int i;
  8. };
  9.  
  10. int main(void)
  11. {
  12. printf("Groesse : %lu\n", (unsigned long)sizeof(struct Test));
  13. printf("Offset c: %lu\n", (unsigned long)offsetof(struct Test,c));
  14. printf("Offset i: %lu\n", (unsigned long)offsetof(struct Test,i));
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 2008KB
stdin
Standard input is empty
stdout
Groesse : 8
Offset c: 0
Offset i: 4