Question: Question 7 What is wrong in the following code? ` ` ` #include #include using namespace std; int main ( ) { vector v; cout

Question 7
What is wrong in the following code?
```
#include
#include
using namespace std;
int main()
{
vector v;
cout v[\theta];
return 0;
}
```
The program has a compile error on \(\mathrm{v}[0]\).
The program has a compile error on vector v .
The program has a runtime error on vector v .
The program has a runtime error on v[0], because the vector is empty.
Question 7 What is wrong in the following code? `

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!