Advertisement
Kagalive

Limits of ints

Sep 30th, 2020 (edited)
1,151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2. #include <limits>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.    cout << "int type\n";
  8.    cout << "--------\n";
  9.    cout << " Size: " << sizeof(int) << " bytes\n";
  10.    cout << " Max: " << numeric_limits<int>::max() << '\n';
  11.    cout << " Min: " << numeric_limits<int>::min() << '\n';
  12. }
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement