What is the difference between a vector’s size and a vector’s capacity?

What will be an ideal response?


A vector’s size refers to the actual number of elements with values in the vector, whereas
the vector’s capacity refers to the total number of memory locations reserved for the vector’s use.

Computer Science & Information Technology

You might also like to view...

Which of the following is a form control that allows a user to click a list arrow to display the list and make a selection?

A. option list B. drop-down list box C. list box D. choice list

Computer Science & Information Technology

Compressing pictures in a presentation will make the file size ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

Works come under copyright protection as soon as:

a. they have been submitted to the U.S. Copyright Office. b. a notice is published in the legal notices of a local newspaper. c. they are notarized by a notary public. d. they are created and presented in a fixed form. e. the original idea, concept, drawing, draft, or intent is communicated to someone else.

Computer Science & Information Technology

What type of monitoring compares network traffic, activities, transactions, or behavior against a database of known attack patterns?

A. application-based B. protocol-based C. behavioral-based D. signature-based

Computer Science & Information Technology