#include #include #include using namespace std; int main(){ cout <<"Let's check the amount of memory held in memory by several data types"<< endl<< endl; cout<< "an int object occupies "<< sizeof(int)<< " in memory"<< endl; cout<< "an double object occupies "<< sizeof(double)<< " in memory"<< endl; cout<< "an string object occupies "<< sizeof(string)<< " in memory"<< endl; cout<< "an vector object occupies "<< sizeof(vector)<< " in memory"<< endl; cout<< "an vector object occupies "<< sizeof(vector)<< " in memory"<< endl; vector vecdob; vecdob.push_back(1.2); vecdob.push_back(1.2); cout<< "the vecdob object occupies "<< sizeof(vecdob)<< " in memory"<< endl; string s1; cout<< "Before initialisation s1 occupies "<< sizeof(s1)<< " in memory"<< endl; s1="......"; cout<< "But now s1 occupies "<< sizeof(s1)<< " in memory"<< endl; return 0; }