fork download
  1. #include <stdio.h>
  2. #include <stdint.h>
  3. struct uint48 {
  4. uint64_t x:48;
  5. } __attribute__((packed));
  6.  
  7. int main(void)
  8. {
  9. struct uint48 ui48;
  10. printf( "%u\n", sizeof(ui48)); // prints 6
  11. printf( "%zu\n", sizeof(ui48));
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 2248KB
stdin
Standard input is empty
stdout
6
6