Five Ways To Dangle

v is a std::vector<int> with size() == 10 and capacity() == 16. An iterator it currently refers to v[5].

More than one of the following invalidates it. Select every operation that does.

A

v.push_back(42);

B

v[3] = 42;

C

v.insert(v.begin() + 2, 42);

D

v.reserve(32);

E

v.erase(v.begin() + 8);