Chapter 42 Flashcards

1
Q

What are iterators

A

STL iterators provide pointer operations such as * and ++

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are categories of iterators

A
  • Input iterators
  • Output iterators
  • Forward iterators
  • Bidirectional iterators
  • Random-access iterators
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is input iterator

A

Can read only an element. Can only move forward in one direction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is output iterator

A

Can only write an element. Can only move forward direction one element at a time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is forward iterator

A

Combine the capabilities of both input and output iterator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is bidirectional iterator

A

Have all functionality of forward iterator. Additionally, they also move backward.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is random-access iterator

A

Provides all capabilities of bidirectional iterators. Plus they can directly access any element of a container

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is -> operator

A

Access operator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is *p

A

dereference operator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How much standard algorithm STL have

A

70

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are STL algorithm

A

STL algorithm may use iterator to manipulate container

How well did you know this?
1
Not at all
2
3
4
5
Perfectly