Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main( int argc, char ** argv ) {
- struct S
- {
- int i;
- int b;
- int c;
- long int e;
- };
- cout << sizeof (struct S) << endl; //sizeof is still an operator
- return 0;
- }
- struct S
- {
- int i; // 4 bytes
- int b; // 4 bytes
- int c; // 4 bytes
- // 4 invisible bytes of padding to get e to an 8 byte boundary
- long int e; // 8 bytes
- };
Add Comment
Please, Sign In to add comment