Search

DATA TYPES

 "Data types specifies the type and size of data . "

A program contains different types of data (integer , real , character etc.)  and need to store values being used in the program . C++ language is rich of data types . 

It is divided into three types ------------------

  1. Primary data types 
  2. Derived data types 
  3. User Defined data types

Data Type

Size (in bytes)

Range

short int

2

-32,768 to 32,767

unsigned short int

2

0 to 65,535

unsigned int

4

0 to 4,294,967,295

int

4

-2,147,483,648 to 2,147,483,647

long int

4

-2,147,483,648 to 2,147,483,647

unsigned long int

4

0 to 4,294,967,295

long long int

8

-(2^63) to (2^63)-1

unsigned long long int

8

0 to 18,446,744,073,709,551,615

signed char

1

-128 to 127

unsigned char

1

0 to 255

float

4

 

double

8

 

long double

12

 

wchar_t

2 or 4

1 wide character




No comments:

Post a Comment

DATA TYPES

 "Data types specifies the type and size of data . " A program contains different types of data (integer , real , character etc.) ...