fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. std::cout
  6. << sizeof(char) << " sizeof(char)" << "\n"
  7. << sizeof(char*) << " sizeof(char*)" << "\n"
  8. << sizeof(int) << " sizeof(int)" << "\n"
  9. << sizeof(int*) << " sizeof(int*)" << "\n"
  10. << sizeof(long) << " sizeof(long)" << "\n"
  11. << sizeof(long long) << " sizeof(long long)" << "\n"
  12. << sizeof(void(*)()) << " sizeof(void(*)())" << "\n"
  13. << sizeof(int(*)(int)) << " sizeof(int(*)(int))" << std::endl;
  14. }
Success #stdin #stdout 0s 4524KB
stdin
Standard input is empty
stdout
1 sizeof(char)
8 sizeof(char*)
4 sizeof(int)
8 sizeof(int*)
8 sizeof(long)
8 sizeof(long long)
8 sizeof(void(*)())
8 sizeof(int(*)(int))