Monday, August 17, 2020

4.1.1 Integer Types

  • Integer types are used to store any whole number (without decimal). 
  • Integer types are of 5 types. 
  • Although they all store whole numbers But they are divided on the basis of memory size and range.

Data Type

Size (bytes)

Range

int

2

-32768 to 32767

short int

1

-128  to 127

long int

4

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

signed int (negative values )

2

-32768 to 32767

unsigned int

2

0  to 65535




Example :-


/* A Long integer type variable */ long int population = 200000000;





No comments:

Post a Comment

Please do not any spam link in Comment Box