fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class test1 {
  5. static int a;
  6. };
  7.  
  8. class test2 {
  9. int a;
  10. };
  11.  
  12. int main() {
  13. // your code goes here
  14. cout << "test1 : " << sizeof(test1) << endl;
  15. cout << "test2 : " << sizeof(test2) << endl;
  16. return 0;
  17. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
test1 : 1
test2 : 4