Suppose we have the following definition:

vector vec, vec1;
//use push_back to put 10 values into vec
vector::iterator p = vec.begin();
vector::const_iterator q = vec.begin();
Which of the following expressions is not legal? Treat the effect of these as non-cumulative.
A) *p = 1; B) *q = 1;
C) p = vec.end (); D) q = vec1.end();
A, C, D


B) *q = 1;

Computer Science & Information Technology

You might also like to view...

Describe the value of quantitative analysis.

What will be an ideal response?

Computer Science & Information Technology

Which of the following will not produce a compiler error?

a. Changing the value of a constant after it is initialized. b. Changing the value at a given index of an array after it is created. c. Using a final variable before it is initialized. d. All of the above will produce compiler errors.

Computer Science & Information Technology

When running a slide show, you can press the ____ key to see a list of keyboard shortcuts.

A. F1 B. F2 C. F3 D. F4

Computer Science & Information Technology

The act of storing files on the Internet is called cloud computing

Indicate whether the statement is true or false

Computer Science & Information Technology