Question: Examine the following code. State what line 1 does, and state the outputs of lines 2 and 3 . include #include using namespace std; class
Examine the following code. State what line does, and state the outputs of lines
and
include
#include
using namespace std;
class Container
private:
vector A;
public:
Containerconst int size,int array
for unsigned int i ; i size; i
Apushbackarray;
;
int operatorint index return Aindex Aindex;
int operatorreturn A;
;
int main
const int ksize ;
int arrayksize;
Container Aksizearray; Line
cout A endl; Line
cout A endl; Line
c When dealing with vectors, explain the difference between the functions size
and capacity
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
