How would you set a variable to equal infinity (or any guaranteed largest number value) in C?
Value of INT_MAX is +2147483647. Value of INT_MIN is -2147483648.
Int. The int data type can store whole numbers from -2147483648 to 2147483647. In general, and in our tutorial, the int data type is the preferred data type when we create variables with a numeric value.
#include <limits.h> int x = INT_MAX;
EDIT: answered before the questioner clarified, I was just guessing what type they wanted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With