Vectors-C++ language

User Generated

Gnanf

Programming

Description

plz do the quiz asap. plz do the quiz asap. plz do the quiz asap. plz do the quiz asap. plz do the quiz asap.plz do the quiz asap.plz do the quiz asap. plz do the quiz asap. plz do the quiz asap.plz do the quiz asap.plz do the quiz asap. plz do the quiz asap. plz do the quiz asap. plz do the quiz asap. plz do the quiz asap. plz do the quiz asap. plz do the quiz asap. plz do the quiz asap. plz do the quiz asap. plz do the quiz asap.

Unformatted Attachment Preview

1. A vector is a data structure holds related data of the same type is similar to an array, except that you don't have to predetermine its size all of the above 2. Which statement is most true about this declaration? vector vector1; this declares a vector object that holds integer data this declares a vector named double that holds integer data this declares a vector object that holds double data this declares an array that holds double data 3. Objects are instances of classes that are used through calling methods. True False 4. What does the push_back() method do? adds a value at the front of a vector adds a value at the end of a vector removes a value at the front of a vector removes a value at the back of a vector 5. What method returns the number of items currently stored in a vector? 6. 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 7. Which statement best describes the vector capacity() and size() methods? they can be used interchangeably capacity() returns the current potential number of storage positions and size() returns the actual number of things that are stored size() returns the current potential number of storage positions and capacity() returns the actual number of things that are stored
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Hey I am through. Please find the correct answers in the attached word file. The answers to the multiple answer questions are in bold and highlighted in yellow.

1.
A vector is
a data structure
holds related data of the same type
is similar to an array, except that you don't have to predetermine its size
all of the above
2.
Which statement is...


Anonymous
I was having a hard time with this subject, and this was a great help.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags