For this iterator which of the following is correct? If correct what does the expression produce?

Suppose we have the following definition:
```
vector vec;
// use push_back to put 10 values into vec here.
vector::iterator itr1, itr2,itr3;
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 vec;
// use push_back to put 10 values into vec here.
vector::iterator itr1, itr2,itr3;
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

Computer Science & Information Technology

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

Computer Science & Information Technology

The method size in the class Vector returns the number of elements in the vector.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology