+ All Categories
Home > Education > Data types in C

Data types in C

Date post: 14-Dec-2014
Category:
Upload: prabhu-govind
View: 36 times
Download: 0 times
Share this document with a friend
Description:
Data types in C for S-Teacher
2
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.
Transcript
Page 1: Data types in C

DATA TYPESPrimitive data types

int, float, double, charDerived data types

Arrays come under this categoryArrays can contain collection of int or float or

char or double dataUser defined data types

Structures and enum fall under this category.

Page 2: Data types in C

NameName DescriptionDescription Size*Size* Range*Range*

charchar Character or small Character or small integerinteger

1 byte1 byte signed: -128 to 127signed: -128 to 127unsigned: 0 to 255 unsigned: 0 to 255

short intshort int

(short)(short)Short integerShort integer 2 bytes2 bytes signed: -32768 to 32767signed: -32768 to 32767

unsigned: 0 to 65535 unsigned: 0 to 65535

intint IntegerInteger 4 bytes4 bytes signed: -2147483648 to 2147483647signed: -2147483648 to 2147483647unsigned: 0 to 4294967295 unsigned: 0 to 4294967295

long intlong int

(long)(long)Long integerLong integer 4 bytes4 bytes signed: -2147483648 to 2147483647signed: -2147483648 to 2147483647

unsigned: 0 to 4294967295unsigned: 0 to 4294967295

floatfloat Floating point numberFloating point number 4 bytes4 bytes 3.4e +/- 38 (7 digits) 3.4e +/- 38 (7 digits)

doubledouble Double precision Double precision floating point numberfloating point number

8 bytes8 bytes 1.7e +/- 308 (15 digits) 1.7e +/- 308 (15 digits)

long doublelong double Long double precision Long double precision floating point numberfloating point number

8 bytes8 bytes 1.7e +/- 308 (15 digits) 1.7e +/- 308 (15 digits)

Data Types


Recommended