For this iterator which of the following is correct? If correct what does the expression produce?
Suppose we have the following definition:
```
vector
// use push_back to put 10 values into vec here.
vector
itr1 = vec.begin();
itr2 = vec.begin() + 5;
itr3 = vec.end();
```
a) ```
*iter1
```
b) ```
itr2[3]
```
c) ```
itr + 3
```
>>>there is no itr, Do you mean itr3?
d) ```
itr – 3
```
e) ```
itr3 – itr1
```
(if valid, what does this produce?)
>>You asked for what is produced for all of them in intro to question
Suppose we have the following definition:
```
vector
// use push_back to put 10 values into vec here.
vector
itr1 = vec.begin();
itr2 = vec.begin() + 5;
itr3 = vec.end();
```
a) ```
*iter1
```
b) ```
itr2[3]
```
c) ```
itr + 3
```
>>>there is no itr, Do you mean itr3?
d) ```
itr – 3
```
e) ```
itr3 – itr1
```
(if valid, what does this produce?)
>>You asked for what is produced for all of them in intro to question
You might also like to view...
Items that can be listed in any order are best presented using which of the following?
A) Numbered list B) Bulleted list C) Outline list
The method size in the class Vector returns the number of elements in the vector.
Answer the following statement true (T) or false (F)