fork download
  1. #include <stdio.h>
  2. #include <stdint.h>
  3. #include <sys/utsname.h>
  4.  
  5. struct abc
  6. {
  7. uint16_t port_no; //2 Bytes
  8. uint8_t src_mac[6]; //6 Bytes
  9. };
  10.  
  11. int main(void)
  12. {
  13. struct utsname uts;
  14. uname(&uts);
  15. printf("%s, %s, %s, %s, %s\n", uts.sysname, uts.nodename, uts.release, uts.version, uts.machine);
  16. printf("sizeof(void*): %zu, sizeof(abc): %zu", sizeof(void*), sizeof(struct abc));
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 4392KB
stdin
Standard input is empty
stdout
Linux, checker, 3.16.0-4-amd64, #1 SMP Debian 3.16.43-2+deb8u5 (2017-09-19), x86_64
sizeof(void*): 8, sizeof(abc): 8