CodeClerks

BASIC DATA TYPES OF C & C++



Write the reason you're deleting this FAQ

BASIC DATA TYPES OF C & C++

Both C and C++ compilers support all thebuilt-in(also known asbasicor fundamental) data types. Withthe exception of void, the basicdata types may have several modifierspreceding them to serve the needs of various situations. The modifiers signed, unsigned, long and short may beapplied to character and integer basic data types. However, the modifier long may also be applied a double. Data type representation ismachine specific in C++.

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 -31768 to 32767
short int 2 -31768 to 32767
unsigned short int 2 0 to 65535
signed short int 2 -32768 to 32767
long int 4 -2147483648 to 2147483647
signed long int 4 -2147483648 to 2147483647
unsigned long int 4 0 to 4294967295
float 4 3.4E-38 to 3.4E+38
double 8 1.7E-308 to 1.7E+308
long double 10 3.4E-4932 to 1.1E+4932

Comments

Please login or sign up to leave a comment

Join
simicartan
thanks for sharing such great content!
keep up with the good work!


App Marketing Made Easy



Are you sure you want to delete this post?