Q:

Contrast the following program with the one in the previous exercise

0

Contrast the following program with the one in the previous exercise

vector<int> v;
v[0] = 1;

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

The code will cause error. Because the subscript operator accesses element that not existed, the behaviour is undefined.

 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now