Last Updated :
10 Apr, 2024
Choose the correct option from given below to declare vector:
- vector <int> vec (10);
- vector vec<> (10);
- vector <int> (10);
(A) 1
(B) 2
(C) 1 and 3
(D) None of the mentioned
Answer: (A)
Explanation:
The syntax for declaring the vector element is vector variable_name (number_of_elements);
Share your thoughts in the comments
Please Login to comment...