Which of the following defines a vector of integers named nu
Which of the following defines a vector of integers named nums with 3 elements each initialized to 5?
Select one:
a. vector<nums> 3(5);
b. vector<int> nums = 3(5);
c. vector<int> nums(3, 5);
d. vector<3> nums(5);
Solution
Ans)c
Reason:
The syntax for delcaring a vector of particular datatype ,providing with the name
vector<datatype> vectorname(no_of_elements,default_value);

