C++ program to find the range of data types
kw.cpp
Output
kodingwindow@kw:~$ g++ kw.cpp
kodingwindow@kw:~$ ./a.out ——————————————————————————————————————————— Program to print the range of data types ——————————————————————————————————————————— Signed char | -128 To 127 Unsigned char | 0 To 255 Signed short | -32768 To 32767 Unsigned short | 0 To 65535 Signed int | -2147483648 To 2147483647 Unsigned int | 0 To 4294967295 Signed long | -9223372036854775808 To 9223372036854775807 Unsigned long | 0 To 18446744073709551615 float | 1.17549e-38 To 3.40282e+38 double | 2.22507e-308 To 1.79769e+308 ——————————————————————————————————————————— Signed char | -128 To 127 Unsigned char | 0 To 255 Signed short | -32768 To 32767 Unsigned short | 0 To 65535 Signed int | -2.14748e+09 To 2.14748e+09 Unsigned int | 0 To 4.29497e+09 Signed long | -9.22337e+18 To 9.22337e+18 Unsigned long | 0 To 1.84467e+19 ——————————————————————————————————————————— kodingwindow@kw:~$
Advertisement