#include using namespace std; void main() { bool b; char c; int n; long l; float f; double d; cout << "sizeof a bool = " << sizeof b << endl; cout << "sizeof a char = " << sizeof c << endl; cout << "sizeof a int = " << sizeof n << endl; cout << "sizeof a long = " << sizeof l << endl; cout << "sizeof a float = " << sizeof f << endl; cout << "sizeof a double = " << sizeof d << endl; cout << endl << endl; cout.setf(ios::hex); //show decimals as hex cout.unsetf(ios::dec); cout << "address of bool = " << &b << endl; cout << "address of char = " << &c << endl; cout << "address of int = " << &n << endl; cout << "address of long = " << &l << endl; cout << "address of float = " << &f << endl; cout << "address of double = " << &d << endl << endl; system("pause"); } The output: sizeof a bool = 1 sizeof a char = 1 sizeof a int = 4 sizeof a long = 4 sizeof a float = 4 sizeof a double = 8 address of bool = 12ff8b address of char = address of int = 12ff84 address of long = 12ff80 address of float = 12ff7c address of double = 12ff74 Press any key to continue . . .