Guest User

Untitled

a guest
Jan 19th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. int main( int argc, char ** argv ) {
  2. struct S
  3. {
  4. int i;
  5. int b;
  6. int c;
  7. long int e;
  8. };
  9. cout << sizeof (struct S) << endl; //sizeof is still an operator
  10. return 0;
  11. }
  12.  
  13. struct S
  14. {
  15. int i; // 4 bytes
  16. int b; // 4 bytes
  17. int c; // 4 bytes
  18. // 4 invisible bytes of padding to get e to an 8 byte boundary
  19. long int e; // 8 bytes
  20. };
Add Comment
Please, Sign In to add comment