Solved

What Does the Following Statement Do? Vector<int> V(10, 2);

Question 5

Multiple Choice

What does the following statement do? vector<int> v(10, 2) ;


A) It creates a vector object and initializes all the first two elements with the values 10 and 2.
B) It creates a vector object with a starting size of 2 and the first element initialized with the value 10.
C) It creates a vector object with a starting size of 10 and the first element initialized with the value 2.
D) It creates a vector object with a starting size of 10 and all elements are initialized with the value 2.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions