What is the alternative to C INT_MAX and INT_MIN in C++

1 Answer

0 votes
#include <iostream>
#include <limits>

int main() {
    std::cout << "Maximum int value: " << std::numeric_limits<int>::max() << std::endl;
   
    std::cout << "Minimum int value: " << std::numeric_limits<int>::min() << std::endl; 
}



/*
run:

Maximum int value: 2147483647
Minimum int value: -2147483648

*/

 



answered May 17, 2025 by avibootz

Related questions

1 answer 137 views
1 answer 113 views
113 views asked Dec 12, 2022 by avibootz
1 answer 114 views
114 views asked Dec 12, 2022 by avibootz
1 answer 70 views
1 answer 76 views
...