#include #include using namespace std; class student { public: int id ; student( int idP ) { id = idP ; cout << "Constructor called for ;" << id << endl ; } student( const student& obj1 ) { id = obj1.id ; cout << "Copy Constructor called for ;" << id << endl ; } ~student( ) { cout << "Destructor called for ;" << id << endl ; } }; int main() { // create a vector to store int vector vec; int i1; student studentObj( 1 ) ; // display the original size of vec cout << "vector size = " << vec.size() << endl; vec.push_back( studentObj ); // display extended size of vec cout << "extended vector size = " << vec.size() << endl; cout << "value of vec [" << 0 << "] = " << vec[0].id << endl; return 0; }