✍️ Get Writing Help
WhatsApp

Output

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

vector intList(7);

intList[0] = 5;

for (int i = 1; i < 7;=””>

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

for (int i = 0; i < 7;=””>

cout < intlist.at(i)="">< "="">

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 < classlist.size();=””>

         cout < classlist[i]="">< "="" --="">

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 < classlist.size();=””>

         cout < classlist[i]="">< "="" --="">

cout < endl;=””>

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

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102