Question: vector yearsList ( 4 ) ; yearsList.at ( 0 ) = 1 9 9 9 ; yearsList.at ( 1 ) = 2 0 1 2

vector yearsList(4);
yearsList.at(0)=1999;
yearsList.at(1)=2012;
yearsList.at(2)=2025;
What are the contents of the vector if the above code is followed by the statement:
yearsList.at(0)= yearsList.at(2)
vector yearsList(4);
yearsList.at(0)=1999;
yearsList.at(1)=2012;
yearsList.at(2)=2025;
What are the contents of the vector if the above code is followed by the statement:
yearsList.at(0)= yearsList.at(2)
1999,2012,1999,0
2025,2012,2025,0
2025,2012,2025
2012,2012,2025,0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!