Search
 
SCRIPT & CODE EXAMPLE
 

CPP

data types ranges c++

Data Type                              Range                      Macro for min value           Macro for max value
char                                -128 to +127                        CHAR_MIN                      CHAR_MAX
short char                          -128 to +127                       SCHAR_MIN                     SCHAR_MAX
unsigned char                         0  to 255                             0                        UCHAR_MAX

short int                         -32768 to +32767                      SHRT_MIN                      SHRT_MAX
unsigned short int                    0  to  65535                          0                        USHRT_MAX 
int                          -2147483648 to +2147483647                  INT_MIN                       INT_MAX
unsigned int                          0  to  4294967295                     0                         UINT_MAX
long int            -9223372036854775808 to +9223372036854775807        LONG_MIN                      LONG_MAX
unsigned long int                     0  to  18446744073709551615           0                        ULONG_MAX 
long long int       -9223372036854775808 to +9223372036854775807       LLONG_MIN                     LLONG_MAX
unsigned long long int                0  to  18446744073709551615           0                       ULLONG_MAX

float                        1.17549e-38 to  3.40282e+38                 FLT_MIN                       FLT_MAX
float(negative)             -1.17549e-38 to -3.40282e+38                -FLT_MIN                      -FLT_MAX
double                      2.22507e-308 to  1.79769e+308                DBL_MIN                       DBL_MAX
double(negative)           -2.22507e-308 to -1.79769e+308               -DBL_MIN                      -DBL_MAX
Comment

PREVIOUS NEXT
Code Example
Cpp :: c++ return multiple values 
Cpp :: c++ pointer null vs nullptr 
Cpp :: matplotlib hide numbers on axis 
Cpp :: c++ check if vector is sorted 
Cpp :: random number generator c++ between 0 and 1 
Cpp :: getline cpp 
Cpp :: c++ terminal color 
Cpp :: c++ simple car game 
Cpp :: c++ call method in same class 
Cpp :: c++ random number between 0 and 1 
Cpp :: c++ prime sieve 
Cpp :: c++ enum 
Cpp :: udo apt install dotnet-sdk-5 
Cpp :: setprecision c++ 
Cpp :: change int to string c++ 
Cpp :: c++ vector move element to front 
Cpp :: time_t to int 
Cpp :: c++ structure 
Cpp :: declare nullptr c++ 
Cpp :: cpp pushfront vector 
Cpp :: concat two vectors c++ 
Cpp :: swap elements array c++ 
Cpp :: reverse level order traversal 
Cpp :: c++ basic snippet 
Cpp :: image shapes in opencv c++ 
Cpp :: C++ fill string with random uppercase letters 
Cpp :: find element in vector 
Cpp :: Inner Section Sticky Scroll in elementor 
Cpp :: c++ output current timestamp 
Cpp :: linked list in c++ 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =