Data type modifiers

Google Advertisements

Prev Tutorial Next Tutorial

Data type modifiers in C

In c language Data Type Modifiers are keywords used to change the properties of current properties of data type. Data type modifiers are classified into following types.

  • long
  • short
  • unsigned
  • signed

Modifiers are prefixed with basic data types to modify (either increase or decrease) the amount of storage space allocated to a variable.

For example, storage space for int data type is 4 byte for 32 bit processor. We can increase the range by using long int which is 8 byte. We can decrease the range by using short int which is 2 byte.


This can be used to increased size of the current data type to 2 more bytes, which can be applied on int or double data types. For example int occupy 2 byte of memory if we use long with integer variable then it occupy 4 byte of memory.

datatype Modifiers images


long a;  --> by default which represent long int.


In general int data type occupies different memory spaces for a different operating system; to allocate fixed memory space short keyword can be used.


short int a; --> occupies 2 bytes of memory space in every operating system.


This keyword can be used to make the accepting values of a data type is positive data type.


unsigned int a =100;	// right
unsigned int a=-100;	// wrong


This keyword accepts both negative or positive value and this is default properties or data type modifiers for every data type.


int a=10;	// right
int a=-10;	// right
signed int a=10;	// right
signed int a=-10; 	// right

Note: in real time no need to write signed keyword explicitly for any data type.

Prev Tutorial Next Tutorial

Google Advertisements

Buy This Ad Space @$50 per Month, Ad Size 600X200 Contact on: or 8076671483

Pure VPN Privide Lowest Price VPN Just @ $1.65. Per Month with Non Detected IP Lowest Price Non Detected IP VPN

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

Cloud computing is the on demand availability of computer system resources, especially data storage and computing power, without direct active management by the user. Cloud Computing Tutorial

College Projects Related to Java, AWT, C Projects for College, C++ Projects for College, Android Projects. Download Java C C++ Projects

Download Projects

Adsense Advertisements

Buy This ads Space 8076671483

Buy This Ad Space @$120 per Month, Ad Size 300X600 Contact on: or 8076671483 Try this Keyword C++ Programs