Question
Using C++, vectorname.insert(index, new value) 1. Modify the program to create an equivalent program that uses vector string. Initialize the vector by using the array
Using C++, vectorname.insert(index, new value)
1. Modify the program to create an equivalent program that uses vector string. Initialize the vector by using the array string names ={"a,","b","c","d"}.
2. Use the max_element and min_element algorithms to determine the maximum and minimum values in a vector create for part1.Initialize the vector by using names[]={"a,","axon","zeus","b","mary","c","jones","d"}.
3.Modify and replace element[4] with a new name.
4. Insert a new name at position[3].
5. Sort the vector array in descending order. 6. Delete the second element of the vector.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started