What is wrong in the following code?

```
#include
#include
using namespace std;

int main()
{
vector v;
cout << v[0];
return 0;
}
```

A. The program has a runtime error on vector v.
B. The program has a runtime error on v[0], because the vector is empty.
C. The program has a syntax error on vector v.
D. The program has a syntax error on v[0].

B. The program has a runtime error on v[0], because the vector is empty.

Computer Science & Information Technology

You might also like to view...

You can easily and readily change the data type of a field in a table without fear of losing data

Indicate whether the statement is true or false

Computer Science & Information Technology

Match the following comparison operator symbols to their meaning

I. = II. < III. <> IV. >= V. > A. Not equal to B. Equal to C. Greater than D. Less than E. Greater than or equal to

Computer Science & Information Technology