Question: Write a C++ program segment for the following: (a) create a vector of integers of size 10, (b) using a loop, fill in the vector
Write a C++ program segment for the following:
(a) create a vector of integers of size 10,
(b) using a loop, fill in the vector with integers from stdin
(c) by using another loop, find the iterator referring to the first number that is equal to 10 (assuming such number exists),
(d) using the iterator from previous part, change the value of that number to 20,
(e) print out the contents of the resulting vector on stdout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
