Computer Scientists are Pretty Pessimistic

Data Types

Data Types Details `

BASIC DATA TYPES



Data Type Keyword Memory Range Format Specifer
Void void 0 Byte - -
Integer int 2 Bytes / 16 Bits -215 to ( 215-1 )
( -32768 to 32767 )
%d
Unsigned Integer unsigned int 2 Bytes / 16 Bits 0 to ( 216-1 )
( 65535 )
%u
Long Integer long 4 Bytes / 32 Bits -231 to ( 231-1 )
( -2147483648 to 2147483647 )
%ld
Long Long Integer long long 8 Bytes / 64 Bits -9223372036854775807 to 9223372036854775807 %lld
Unsigned Long Integer unsigned long 4 Bytes / 32 Bits 0 to ( 232-1 )
( 4294967295 )
%lu
Unsigned Long Long Integer unsigned long long 8 Bytes / 64 Bits Similar to long long, but unsigned %llu
Character char 1 Byte / 8 Bits 1 Character %c
Floating Point float 4 Bytes / 32 Bits 3.4 X 10-38 to 3.4 X 1038 %f
Floating Point double 8 Bytes / 64 Bits 1.7 X 10-308 to 1.7 X 10308 %lf


NOTES :

  • Signed - Both positive and negative value will be consider.
  • Unsigned - Only positive value will be consider.
  • 1 Byte = 8 Bits.

2 comments: