What is the output of the following C++ code? (4) vector intList(7); intList[0] = 5; for (int i = 1; i intList[i] = 2 * intList[i - 1] + i; for (int i = 0; i cout cout What is the output of the...


What is the output of the following C++ code? (4)


vector intList(7);

intList[0] = 5;


for (int i = 1; i <>



intList[i] = 2 * intList[i - 1] + i;


for (int i = 0; i <>



cout <><>


cout


What is the output of the following C++ code? (4)


a. vector classList;


classList.push_back("Sheila");



classList.push_back("Anita");



classList.push_back("Cecelia");



classList.push_back("Henry");


for (unsigned int i = 0;



i <>



cout <><>


cout


b. vector classList(2);

classList[0] = "Danny";



classList.push_back("Sheila");



classList.push_back("Anita");



classList.push_back("Cecelia");



classList.push_back("Henry");


for (unsigned int i = 0;



i <>



cout <><>


cout <>


c. What is the size of classList in (a)? What is the size of classList in (b)?





May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here