Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. struct str
  2. {
  3.     int a;
  4.     long b;
  5.     int c;
  6. };
  7.  
  8. union uni
  9. {
  10.     int a;
  11.     long b;
  12.     int c;
  13. };
  14.  
  15. #include <iostream>
  16. using namespace std;
  17.  
  18. int main()
  19. {
  20.     cout << "str: " << sizeof(str) << endl;
  21.     cout << "uni: " << sizeof(uni) << endl;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement