maximum value of int
Is there any code to find the maximum value of integer (accordingly to the compiler) in C/C++ like Integer.MaxValue function in java? 8 Answers 8
Is there any code to find the maximum value of integer (accordingly to the compiler) in C/C++ like Integer.MaxValue function in java? 8 Answers 8
I have below a simple program: #include <stdio.h> #define INT32_MIN (-0x80000000) int main(void) { long long bal = 0; if(bal < INT32_MIN ) { printf(“Failed!!!”); } else { printf(“Success!!!”); } return 0; } The condition if(bal < INT32_MIN ) is always true. How is it possible? It works fine if I change the macro to: … Read more