fork download
  1. #include <stdio.h>
  2. #include <stdint.h>
  3.  
  4. struct coordinate {
  5. uint64_t x;
  6. uint64_t y;
  7. };
  8.  
  9. int main() {
  10. struct coordinate* coord;
  11.  
  12. printf("Size of the pointer coord: %lu\n", sizeof(coord));
  13. printf("Size of the struct coordinate: %lu\n", sizeof(*coord));
  14. printf("Also size of the struct coordinate: %lu\n", sizeof(struct coordinate));
  15. printf("Also size of the pointer coord: %lu\n", sizeof(struct coordinate*));
  16. return 0;
  17. }
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
Size of the pointer coord: 8
Size of the struct coordinate: 16
Also size of the struct coordinate: 16
Also size of the pointer coord: 8