Which statement correctly uses C++ 11 to initialize a vector of ints named n with the values 10 and 20?
A) vector n<int>(10, 20) ;
B) vector<int> n = {10, 20};
C) vector<int> n { 10, 20 };
D) int vector n ({10}, {20}) ;
Correct Answer:
Verified
Q21: The _ is automatically appended to a
Q29: How many elements does the following array
Q29: To pass an array as an argument
Q31: What will the following code do?
Q32: To assign the contents of one array
Q32: What does the following statement do?
Q33: A(n) _ can be used to specify
Q33: What will the following C++ 11 code
Q34: What will the following code display?
Q35: A two-dimensional array can have elements of
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents