Suppose you create an uninitialized vector as follows vector-04073
Suppose you create an uninitialized vector as follows: <br>vector<int> evec; <br>After adding the statment, <br>evec.push_back(21); <br>what will happen?
This multiple choice question (MCQ) is related to the book/course vu cs304 Object Oriented Programming. It can also be found in vu cs304 Final Term - Quiz No.10.
Suppose you create an uninitialized vector as follows:
vector<int> evec;
After adding the statment,
evec.push_back(21);
what will happen?
vector<int> evec;
After adding the statment,
evec.push_back(21);
what will happen?
The following statement will add an element to the start (the back) of evec and will initialize it with thevalue 21.
The following statement will add an element to the center of evec and will reinitialize it with the value 21.
The following statement will delete an element to the end (the back) of evec and will reinitialize it withthe value 21.
The following statement will add an element to the end (the back) of evec and initialize it with the value 21.