sir if we want to display the max nd min value of long long int, then what should we write?
is it cout<<LONG_LONG_INT_MAX<<endl;
Data type modifiers
@pushkar24sharma LLONG_MAX is used for this purpose.
See this
Limits on Integer Constants
Constant | Meaning | Value |
---|---|---|
LLONG_MIN | Minimum value for a variable of type long long | -9223372036854775808 |
LLONG_MAX | Maximum value for a variable of type long long | 9223372036854775807 |
ULLONG_MAX | Maximum value for a variable of type unsigned long long | 18446744073709551615 (0xffffffffffffffff) |
1 Like
okay thank u @mayankA47 sir it is working but what about the short int. if we want to display its min nd max values , then what is the syntax. also what about long long float nd long long double??
Take a look here, these are macros under climits,
http://www.cplusplus.com/reference/climits/
1 Like
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.