✍️ Get Writing Help
WhatsApp

Subscripting operator

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

vector intList(10);

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

     intList[i] = 2 * i + 5;

cout < intlist.front()=””>< “=”” “=””>< intlist.back()=””><>

Suppose that you have the following C11 code:  (4) vector myList(5);

unsigned int length;

myList[0] = 3;

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

    myList[i] = 2 * myList[i – 1] – 5;

myList.push_back(46);

 myList.push_back(57);

 myList.push_back(35);

a. Write a C++ statement that outputs the first and the last elements of myList. (Do not use the array subscripting operator or the index of the elements.)

b. Write a C++ statement that stores the size of myList into length.

c. Write a for loop that outputs the elements of myList.

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