Question: Question 4 What is wrong in the following code? vector v; ( mathrm { v } [ 0 ] = 2 . 5
Question
What is wrong in the following code?
vector v;
mathrmv;
The program has a compile error because there are no elements in the vector.
The program has a runtime error because there are no elements in the vector.
The program has a runtime error because you cannot assign a double value to v
The program has a compile error because you cannot assign a double value to mathrmv
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
