à®®ேலுà®®் பல புதிய டெக்னாலஜி பற்à®±ி தெà®°ிந்து கொள்ள, எங்கள் "டெக் டுப் தமிà®´் நாடு" யூட் டூஃப் சேனலை SUBSCRIBE செய்து கொள்ளவுà®®்.

Breaking

Thursday, 6 July 2017

Datatype Modifiers in C++

Datatype Modifiers in C++

In C++ language Data Type Modifiers are keywords used to change the properties of current properties of data type. Datatype 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.

long:

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.
TechTubeTN

Syntax

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

short

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

Syntax

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

unsigned

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

Syntax

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

Signed

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

Example

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.

No comments:

Post a Comment

Hai , Post your comment . (required, Bugs, Errors )

You need to see


SUBSCRIBE NOW



Backlinks : Website Design Company in Coimbatore
Website Design Company in Tamil nadu
Website Design Company in Karur
Website Design Company in Erode
Website Design Company in ooty
Website Design Company in theni
Website Design Company in thoothukudi
Website Design Company in Chennai
Website Design Company in Sathy
Website Design Company in Coimbatore Tamilnadu
Cheap Website Design Company in Coimbatore
Adsense Website Design Company in Coimbatore
ecommerce Website Design Company in Coimbatore
school Website Design Company in Coimbatore
Academy Website Design Company in Coimbatore
Test Website Design Company in Coimbatore
Best Website Design Company in Coimbatore
Adsense Website Design Company in Coimbatore
Adsense Website Design Company in Tamil nadu
Adsense Website Design Company in Karur
Adsense Website Design Company in Erode
Adsense Website Design Company in ooty
Adsense Website Design Company in theni
Adsense Website Design Company in thoothukudi
Adsense Website Design Company in Chennai
Adsense Website Design Company in Sathy
Free SEO Tools online
Free SEO Tools online Website
Free SEO Tools online Plagiarism
Free SEO Tools online article rewriter tool
Free SEO Tools online article reading and writing criticism
Free SEO Tools online seo backlink
Free SEO Tools online Free backlink maker
Free SEO Tools online seo backlink strategy
Free SEO Tools online content writting
360 help SEO Tools online Plagiarism checker
360 help SEO Tools online seo backlink
360 help SEO Tools online Free backlink maker
360 help SEO Tools online content writting
360 help SEO Tools online article rewriter tool
360 help SEO Tools
360 help SEO Tools India
360 help SEO Tools Tamil
360 help SEO Tools website