fork download
  1. #include <iostream>
  2. using namespace std;
  3. enum EnumTest {a=1,b=2};
  4. int main() {
  5. // your code goes here
  6. cout<<sizeof(EnumTest)<<endl;
  7. cout<<a<<endl;
  8. cout<<sizeof(a)<<endl;
  9. enum EnumTest myenum;
  10. myenum = (EnumTest)1;
  11. cout<<myenum<<endl;
  12. cout<<sizeof(myenum)<<endl;
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 2740KB
stdin
Standard input is empty
stdout
4
1
4
1
4