Explain what are the Sizes and ranges of the Basic C++ data types?
Submitted by: AdministratorFollowing table is with respect to a 16-bit word machine:
Type Bytes Range
char 1 -128 to 127
unsigned char 1 0 to 255
signed char 1 -128 to 127
int 2 -32768 to 32767
unsigned int 2 0 to 65535
signed int 2 2 -32768 to 32767
short int 2 2 -32768 to 32767
unsigned short int 2 0 to 65535
signed short int 2 -32768 to 32767
long int 4 4 -2147483648 to 2147483647
signed long int 4 -2147483648 to 2147483647
unsigned long int 4 0 to 4294967295
float 4 4 3.4E-38 to 3.4E+38
double 8 8 1.7E-308 to 1.7E+308
long double 10 3.4E-4932 to 1.1E+4932
Submitted by: Administrator
Type Bytes Range
char 1 -128 to 127
unsigned char 1 0 to 255
signed char 1 -128 to 127
int 2 -32768 to 32767
unsigned int 2 0 to 65535
signed int 2 2 -32768 to 32767
short int 2 2 -32768 to 32767
unsigned short int 2 0 to 65535
signed short int 2 -32768 to 32767
long int 4 4 -2147483648 to 2147483647
signed long int 4 -2147483648 to 2147483647
unsigned long int 4 0 to 4294967295
float 4 4 3.4E-38 to 3.4E+38
double 8 8 1.7E-308 to 1.7E+308
long double 10 3.4E-4932 to 1.1E+4932
Submitted by: Administrator
Read Online C++ Syntax Job Interview Questions And Answers
Top C++ Syntax Questions
☺ | Explain what are the Sizes and ranges of the Basic C++ data types? |
☺ | What is switch case in C++ Syntax? |
☺ | What OO language is best? |
☺ | What is functions Syntax in C++? |
☺ | What’s the “Software Peter Principle”? |
Top C Plus Plus Language Categories
☺ | C++ Pointers & Functions Interview Questions. |
☺ | C++ Operator Overloading Interview Questions. |
☺ | C++ Exception Handling Interview Questions. |
☺ | C++ Virtual Functions Interview Questions. |
☺ | C++ Template Interview Questions. |