fork download
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5. struct C1 {
  6. bool a;
  7. int b;
  8. bool c;
  9. };
  10. struct C2 {
  11. bool a;
  12. bool c;
  13. int b;
  14. };
  15.  
  16. int main() {
  17. const size_t per_mb = 1024*1024;
  18. cout << sizeof(C1)*1e8/per_mb << endl
  19. << sizeof(C2)*1e8/per_mb << endl;
  20. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
1144.41
762.939