Check out example codes for "int max in c++". It will help you in understanding the concepts better.

Code Example 1

#include <limits>

int imin = std::numeric_limits<int>::min(); // minimum value
int imax = std::numeric_limits<int>::max(); // maximum value (2147483647)

Code Example 2

// largest int in c++
signed int iMax = (unsigned int)~0 >> 1;
// largest unsigned int
unsigned int uMax = (unsigned int)~0;

Code Example 3

2147483647
  unsigned long long int = 18 446 744 073 709 551 615

Learn ReactJs, React Native from akashmittal.com