Greetings;

I was doing a problem in this book and this doesn't seem right to me. Can anyone pls give me their advice?

Vector<int> x,y(7),z(4,2),w(6);

w.push_back(14);

w.push_back(39);

1. capacity of x is __ and size is __

2. capacity of y is __ and size is __

3. " " z is __ and size is __

4. " " w is __ and size is __

what is the output of:

cout <<w.front() << ' ' << w.back()<<endl;

Now for my answers pls see below:

1. 0,0

2. 7,0

3. 4,2

4. 6,0

5. 14 and 39

Now the part that confuses me and I wonder if someone can explain to me why?

The Books answers:

1. 0,0

2. 7,7

3. 4,4

4.

5. 0,39