What is wrong in the following code?

```
vector v;
v[0] = 2.5;

```

a. The program has a compile error because there are no elements in the vector.
b. The program has a runtime error because there are no elements in the vector.
c. The program has a runtime error because you cannot assign a double value to v[0].
d. The program has a compile error because you cannot assign a double value to v[0].

b. The program has a runtime error because there are no elements in the vector.

Computer Science & Information Technology

You might also like to view...

What is the advantage of using the Command Button control to create a macro?p.000

What will be an ideal response?

Computer Science & Information Technology

Spreadsheet software can be used to create an on-screen __________ that is based on a grid of columns and rows.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology