What is wrong in the following code?

```
vector v;
v[0] = 2.5;
```
a. The program has a runtime 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.
c. The program has a compile error because there are no elements in the vector.
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...

Spector is a software honeypot that can be configured in one of five modes. Which of the following are the correct modes?

a. Open, secure, insecure, failing, aggressive b. Open, secure, failing, strange, aggressive c. Open, secure, insecure, half secure, aggressive d. secure, insecure, failing, aggressive, progressive

Computer Science & Information Technology

Generation 1 virtual machines can only perform a network boot using IPv4.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology