fork download
  1. #include <iostream>
  2. #include <limits>
  3. int main()
  4. {
  5. std::cout << static_cast<size_t>(0) << std::endl;
  6. std::cout << static_cast<size_t>(1) << std::endl;
  7. std::cout << sizeof(int) << std::endl;
  8. std::cout << -1/sizeof(int) << std::endl;
  9. std::cout << ((static_cast<size_t>(0) - static_cast<size_t>(1)) / sizeof(int)) << std::endl;
  10. std::cout << std::numeric_limits<size_t>::max()/4 << std::endl;
  11. }
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
0
1
4
1073741823
1073741823
1073741823