fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. typedef struct __attribute__ ((__packed__)) {
  5. char a;
  6. long int b;
  7. char c;
  8. } struct_t;
  9.  
  10. int main() {
  11.  
  12. std::cout << sizeof(struct_t) << '\n';
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
6