Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms


michaellim.netfirms.com
 

'Life is short, enjoy life.'

Michael Lim

Main Menu

Home

My languages

My programs

My notes

My resume

My pictures

My readings

My work experience

Links

Schedules

My guestbook

 

 

TRANSLATION CENTER by Google

Translate text from               

Translate my homepage text from       

 

Size of Variable Types.

Variable Types
Type - Size - Values


bool - 1 byte - true or false

unsigned short int - 2 bytes - 0 to 65,535

short int - 2 bytes - -32,768 to 32,767

unsigned long int - 4 bytes - 0 to 4,294,967,295

long int - 4 bytes - -2,147,483,648 to 2,147,483,647

int (16 bit) - 2 bytes - -32,768 to 32,767

int (32 bit) - 4 bytes - -2,147,483,648 to 2,147,483,647

unsigned int (16 bit) - 2 bytes - 0 to 65,535

unsigned int (32 bit) - 4 bytes - 0 to 4,294,967,295

char - 1 byte - 256 character values

float - 4 bytes - 1.2e-38 to 3.4e38

double - 8 bytes - 2.2e-308 to 1.8e308

SAMPLE PROGRAM.
#include <iostream>

int main()
{
using std::cout;

cout << "The size of an int is:\t\t"
<< sizeof(int) << " bytes.\n";
cout << "The size of a short int is:\t"
<< sizeof(short) << " bytes.\n";
cout << "The size of a long int is:\t"
<< sizeof(long) << " bytes.\n";
cout << "The size of a char is:\t\t"
<< sizeof(char) << " bytes.\n";
cout << "The size of a float is:\t\t"
<< sizeof(float) << " bytes.\n";
cout << "The size of a double is:\t"
<< sizeof(double) << " bytes.\n";
cout << "The size of a bool is:\t"
<< sizeof(bool) << " bytes.\n";
cout << "The size of a long double is:\t"
<< sizeof(long double) << " bytes.\n";
return 0;
}

Quotes!

"In order to live skilfully, in harmony with the dynamic Universe, it is essential to accept the reality of change and impermanence. The wise person therefore travels lightly, with a minimum of clutter, maintaining the proverbial 'open mind' in all situations, for he or she knows that tomorrow's reality will not be the same as today's. He or she will also have learnt the divine art of letting go - which means not being attached to people and possessions and situations, but rather, when the time for parting comes, allowing that to happen graciously." The elements of buddhism - John Snelling.

"Humans are just shadows and dust! (Gladiator) It doesn't matter where you are from, you are no different from the person borned on the other side of the world. That's why you have social science classes, to study how humans behave. It's just logic, nothing more or less than a computer." Michael Lim.

"Life in every breath. Great men rised and fell. Does it matter to be one?" The Last Samurai.

"God is jealous of us because we are immortal and every moment of our life is precious." Troy.

 

Google
 

Copyright michaellim.netfirms.com.