Question: Need help with the following C++ question: Which statement is true about this code: vector names; names[10] = Tom; it can be used to automatically

Need help with the following C++ question:

Which statement is true about this code:

vector names;

names[10] = "Tom";

it can be used to automatically set the capacity of the array to 11 items

it can be used anytime, regardless of the size of the array

it can't be used unless the capacity of the array has been previously set to 11

it should only be used if the size of the array is already at least 11

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!