/*
 * tamanhos.cpp
 *
 *  Created on: Apr 19, 2009
 *      Author: blabos
 */
#include <iostream>

using namespace std;

int main(int argc, char** argv) {
    (void)argc;
    (void)argv;
    
    cout << endl << "Tamanho de ponteiros:" << endl << endl;
    
    char	c, *pc;
	int		i, *pi;
	double	d, *pd;
	
	// O operador sizeof diz o tamanho do tipo do seu argumento.
	cout << "Size of char:    " << sizeof(c) << " bytes" << endl;
	cout << "Size of int:     " << sizeof(i) << " bytes" << endl;
	cout << "Size of double:  " << sizeof(d) << " bytes" << endl;
	
	cout << endl;
	
	cout << "Size of char*:   " << sizeof(pc) << " bytes" << endl;
	cout << "Size of int*:    " << sizeof(pi) << " bytes" << endl;
	cout << "Size of double*: " << sizeof(pd) << " bytes" << endl;
	
    return 0;
}

