fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct A
  5. {
  6. char c;
  7. int i;
  8. };
  9.  
  10. int main() {
  11. cout << sizeof(A) << "\n";
  12. cout << sizeof(A) - sizeof(int) << "\n";
  13. cout << alignof(int) << "\n";
  14. return 0;
  15. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
8
4
4