1#include <limits>
2
3int imin = std::numeric_limits<int>::min(); // minimum value
4int imax = std::numeric_limits<int>::max(); // maximum value (2147483647)
1// max example
2#include <iostream> // std::cout
3#include <algorithm> // std::max
4
5int main () {
6 std::cout << "max(1,2)==" << std::max(1,2) << '\n';
7 std::cout << "max(2,1)==" << std::max(2,1) << '\n';
8 std::cout << "max('a','z')==" << std::max('a','z') << '\n';
9 std::cout << "max(3.14,2.73)==" << std::max(3.14,2.73) << '\n';
10 return 0;
11}
1// C
2#include <limits.h>
3unsigned int max_unsigned_int_size = UINT_MAX;
4
5// C++
6#include <limits>
7unsigned int max_unsigned_int_size = std::numeric_limits<unsigned int>::max();