Data types in C

PrabhuGovind 639 views 2 slides Apr 30, 2014
Slide 1
Slide 1 of 2
Slide 1
1
Slide 2
2

About This Presentation

Data types in C for S-Teacher


Slide Content

DATA TYPES
Primitive data types
int, float, double, char
Derived data types
Arrays come under this category
Arrays can contain collection of int or float or char or
double data
User defined data types
Structures and enum fall under this category.

NameName DescriptionDescription Size*Size* Range*Range*
charchar Character or small integerCharacter or small integer1 byte1 byte signed: -128 to 127signed: -128 to 127
unsigned: 0 to 255 unsigned: 0 to 255
short intshort int
(short)(short)
Short integerShort integer 2 bytes2 bytessigned: -32768 to 32767signed: -32768 to 32767
unsigned: 0 to 65535 unsigned: 0 to 65535
intint IntegerInteger 4 bytes4 bytessigned: -2147483648 to 2147483647signed: -2147483648 to 2147483647
unsigned: 0 to 4294967295 unsigned: 0 to 4294967295
long intlong int
(long)(long)
Long integerLong integer 4 bytes4 bytessigned: -2147483648 to 2147483647signed: -2147483648 to 2147483647
unsigned: 0 to 4294967295unsigned: 0 to 4294967295
floatfloat Floating point numberFloating point number 4 bytes4 bytes3.4e +/- 38 (7 digits) 3.4e +/- 38 (7 digits)
doubledouble Double precision floating Double precision floating
point numberpoint number
8 bytes8 bytes1.7e +/- 308 (15 digits) 1.7e +/- 308 (15 digits)
long doublelong doubleLong double precision Long double precision
floating point numberfloating point number
8 bytes8 bytes1.7e +/- 308 (15 digits) 1.7e +/- 308 (15 digits)
Data Types