Answer:
vec[0].push_back(10)
Step-by-step explanation:
Given
Declaration: vector <int> vec
Required
Assign 10 to the first element
This can be done using the push_back keyword.
The syntax is: vectorname[position].push_back(value);
In this case:
vectorname = vec
position = 0 i.e. first element
value = 10
So, we have:
vec[0].push_back(10)