Skip to main content

C++ language tutorials learn data type in c++

While doing programming in any programming dialect, you have to utilize different factors to store different data. Factors are only held memory areas to store values. This implies when you make a variable you save some space in memory.
You may get a kick out of the chance to store data of different information sorts like character, wide character, number, skimming point, twofold gliding point, boolean and so on. In light of the information kind of a variable, the working framework dispenses memory and chooses what can be put away in the saved memory.

Primitive Built-in Types:

C++ offer the software engineer a rich grouping of inherent and in addition client characterized information sorts. Taking after table records down seven fundamental C++ information sorts:
Type                         Keyword                         
Booleanbool
Characterchar
Integerint
Floating pointfloat
Double floating pointdouble
Valuelessvoid
Wide characterwchar_t

Several of the basic types can be modified using one or more of these type modifiers:
  1. signed
  2. unsigned
  3. short
  4. long
The accompanying table demonstrates the variable sort, how much memory it takes to store the esteem in memory, and what is most extreme and least esteem which can be put away in such kind of factors.
TypeTypical Bit WidthTypical Range
char1byte-128 to 127 or 0 to 255
unsigned char1byte0 to 255
signed char1byte-128 to 127
int4bytes-2147483648 to 2147483647
unsigned int4bytes0 to 4294967295
signed int4bytes-2147483648 to 2147483647
short int2bytes-32768 to 32767
unsigned short int2bytes0 to 65,535
signed short int2bytes-32768 to 32767
long int4bytes-2,147,483,648 to 2,147,483,647
signed long int4bytes-2,147,483,648 to 2,147,483,647
unsigned long int4bytes0 to 4,294,967,295
float4bytes+/- 3.4e +/- 38 (~7 digits)
double8bytes+/- 1.7e +/- 308 (~15 digits)
long double8bytes+/- 1.7e +/- 308 (~15 digits)
wchar_t2 or 4 bytes1 wide character
The sizes of variables might be different from those shown in the above table, depending on the compiler and the computer you are using.
Following is the example, which will produce correct size of various data types on your computer.













This example uses endl, which inserts a new-line character after every line and << operator is being used to pass multiple values out to the screen. We are also using sizeof() operator to get size of various data types.
When the above code is compiled and executed, it produces the following result which can vary from machine to machine:















typed of Declarations:

You can make another name for a current sort utilizing typedef. Taking after is the straightforward sentence structure to characterize another sort utilizing typedef:

typedef type username;
For example, the following tells the compiler that feet is another name for int:



Now, the following declaration is perfectly legal and creates an integer variable called distance:




Enumerated Types:

An enumerated type declares an optional type name and a set of zero or more identifiers that can be used as values of the type. Each enumerator is a constant whose type is the enumeration.
To create an enumeration requires the use of the keyword enum. The general form of an enumeration type is:





Here, the enum-name is the enumeration's type name. The list of names is comma separated.
For example, the following code defines an enumeration of colors called colors and the variable c of type color. Finally, c is assigned the value "blue".





By default, the value of the first name is 0, the second name has the value 1, the third has the value 2, and so on. But you can give a name a specific value by adding an initializer. For example, in the following enumeration, green will have the value 5.






Here, blue will have a value of 6 because each name will be one greater than the one that precedes it.

Popular posts from this blog

How to increase Adsense CPM and increase youtube earnings

Go to youtube site and login to your account.

click
on left corner side your account icon and then click on setting icon



after this click on vidoo manager.

click on video manager and your all videos are shows. click on your video edit buttion and your video settings are shows.

Your video settings are shows like this.

Ok after setting shows click on monetization icon.


after click on monetization icon you see these settings.


Click on monetizing with ads icon.

After click on monetinzing with ads your your video monetizing start. If your video length greater than 10 mint. so you watch these settings.


Ad breaks means ads show your video many times if you adjust it . Click on Insert ad icon and ad set on 25 seconds.

Drag your ad break icon and adjust next ad break like this.

 Next ad break adjust on 2 mints or its your choice and drag it again and again and set ad break time.




After drag ad break time limit last click on after video icon.



After this click on save changes .

You make this set…

Add Blogger Sitemap to Google Webmaster Tools

Google search engine world best search engine.

Go to google webmaster tools. login to your account. If you donot add a website in google webmaster

 tools first you add your website. click on add property icon and put your site and submit.



click on add a property.



after add your website click on submit button.

after submit mitting your site you see this page.



after this click on dashboar and click on crawl icon.


after this click on sitemap.

then click on add/test sitemap button.



put your site map like this.

my website is www.howlearn.net

so my sitemap is www.howlearn.net/sitemap.xml



click on submit button, google webmaster tools take 2 days to process it. after two days google webmaster tool process it. and your post automatically update.


Google Adsense Now Officially Supports websites in Urdu Language

With this new improvement, every one of those Urdu sites — in Urdu text styles — will be permitted to show Adsense promotions and acquire cash with them.



For the individuals who don't have a clue, Urdu distributers were yet not permitted to show Adsense promotions. There were, be that as it may, special cases as some select (generally greater) distributers were permitted to utilize Adsense for  adaptation.

On the off chance that you are not well-known, Adsense is a Google stage that sites and distributers use to show advertisements on their sites. At the point when clients tap on Adsense advertisements or view promotions, distributers are paid on pay per snap or pay per see premise.

Google said that it included Urdu as bolstered dialect after late take-up of Urdu  on the web.

Organization has said that Urdu dialect sites would now be able to apply for Adsense accounts and are urged to check their terms of administrations before applying to ensure that their odds of getting acknow…