Data Types

From wikipost
Revision as of 19:18, 8 February 2012 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Integer types having exactly the specified width


Name Short Size Range
typedef signed char int8_t 1 byte -128 to 127
typedef unsigned char (aka byte) uint8_t 1 byte 0 to 255
typedef signed short 2 bytes -32768 to 32767
typedef unsigned short 2 bytes 0 to 65535
typedef signed int int16_t 2 bytes -2147483648 to 2147483647
typedef unsigned int uint16_t 2 bytes 0 to 4294967295
typedef signed long int int32_t 4 bytes -2147483648 to 2147483647
typedef unsigned long int uint32_t 4 bytes 0 to 4294967295
typedef signed long long int int64_t 8 bytes
typedef unsigned long long int uint64_t 8 bytes
typedef float 4 bytes +/- 3.4e +/- 38 (~7 digits)
typedef double 8 bytes +/- 1.7e +/- 308 (~15 digits)



short int (short) Short Integer. 2bytes signed: -32768 to 32767 unsigned: 0 to 65535


int Integer. 4bytes signed: -2147483648 to 2147483647 unsigned: 0 to 4294967295 long int (long) Long integer. 4bytes signed: -2147483648 to 2147483647 unsigned: 0 to 4294967295 bool Boolean value. It can take one of two values: true or false. 1byte true or false float Floating point number. 4bytes +/- 3.4e +/- 38 (~7 digits) double Double precision floating point number. 8bytes +/- 1.7e +/- 308 (~15 digits) long double Long double precision floating point number. 8bytes +/- 1.7e +/- 308 (~15 digits) wchar_t Wide character. 2 or 4 bytes 1 wide character



See also: