Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need this in 15 minutes please 1. A vector is a data structure holds related data of the same type is similar to an array,

Need this in 15 minutes please

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

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

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

Students also viewed these Databases questions

Question

Examine how people establish the boundaries of their life space.

Answered: 1 week ago

Question

Define the term intellectual property and describe its importance.

Answered: 1 week ago

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago