Is the following program legal? If so, what is the output? #include #include using namespace std; int main( ) {  vector v(10);  int i;  for (i = 0; i  v[i] = i;  vector copy;  copy = v;  v[0] = 42;...


Is the following program legal? If so, what is the output?


#include


#include


using namespace std;


int main( )


{


 vector v(10);


 int i;


 for (i = 0; i <>


 v[i] = i;


 vector copy;


 copy = v;


 v[0] = 42;


 for (i = 0; i <>


 cout <><>


 cout


 return 0;


}



Nov 27, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here