1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Advocard [28]
3 years ago
12

Modify the existing vector's contents, by erasing the element at index 1 (initially 200), then inserting 100 and 102 in the show

n locations. use vector adt's erase() and insert() only, and remember that the first argument of those functions is special, involving an iterator and not just an integer. sample output of below program:
Biology
1 answer:
Aleonysh [2.5K]3 years ago
7 0

Answer:

Following are the code to this question:

#include <iostream>//defining header file

#include <vector>//defining header file

using namespace std;

void PrintVectors(vector<int> numsList)//defining a method PrintVectors that accept an array

{

   int j;//defining integer variable

   for (j = 0; j < numsList.size(); ++j)//defining for loop for print array value  

   {

       cout << numsList.at(j) << " ";//print array

   }

   cout << endl;

}

int main()//defining main method  

{

   vector<int> numsList;//defining array numsList

   numsList.push_back(101);//use push_back method to insert value in array

   numsList.push_back(200);//use push_back method to insert value in array

   numsList.push_back(103);//use push_back method to insert value in array

   numsList.erase(numsList.begin()+1);//use erase method to remove value from array

   numsList.insert(numsList.begin(), 100);//use insert method to add value in array

   numsList.insert(numsList.begin()+2, 102);//use insert method to add value in array

   PrintVectors(numsList);//use PrintVectors method print array value

   return 0;

}

Output:

100 101 102 103  

Explanation:

In the above-given code, inside the main method an integer array "numList" is defined, that use insert method to insert value and use the erase method to remove value from the array and at the last "PrintVectors" method is called that accepts a "numList" in its parameter. In the "PrintVectors" method, a for loop is declared, that prints the array values.

You might be interested in
What is the purpose of crop rotation?
bearhunter [10]

Answer:

the action of rotating around an axis or center

6 0
3 years ago
A meal contains carbohydrate, fat, protein, vitamin D, calcium and iron. What happens to each of these substances in the body?​
qwelly [4]

Answer:

They all started to get digest.

Explanation:

Digestion starts in the mouth and all the way to the small intestine. And, there are many enzymes and digestive jucies which help to digest spefic nutriton amoung them.

4 0
3 years ago
The diagram shows a bacterial cell dividing. What is an ADVANTAGE of this type of reproduction?
Naddika [18.5K]
(Sorry if this is late)

The answer to this is B because it is the only answer choice that is true.

This is actually a quick process, making A incorrect.

C is incorrect because there are no different genes to combine with, since there is only ONE parent cell.

D is incorrect because the offspring are clones. They haven't adapted at all.

Have an awesome day! :)
7 0
3 years ago
Read 2 more answers
How does severe weather in earth's atmosphere affect earth's geosphere
Ket [755]
Severe weather has some major factors of erosion, for example, rain can strip away rock and sand combined with wind can do the same.
6 0
4 years ago
Please help its urgent. 100 points
nika2105 [10]

Answer:

1. Watson and Crick

2. Franklin and Wilkins

3. amount of base pairs

4. double helix

5. pyrimidine

6. purine

7. replication

8. DNA polymerases

9. nitrogen base

10. five-carbon sugar

11. phosphate group

Explanation:

I hope this was helpful, good luck!

6 0
3 years ago
Read 2 more answers
Other questions:
  • On microscopic examination, John observed yeast cells dividing into daughter cells. What type of asexual reproduction does this
    11·2 answers
  • True or false. peripheral nerves extend from the spinal cord to all parts of the body. *
    10·1 answer
  • A lung cell had 26 chromosomes, how many chromosomes would the sex cells of that organism have?
    14·2 answers
  • Large molecule made up of amino acids
    6·1 answer
  • Identify a minimum of three types of genetically engineered plants and describe their functions.
    11·1 answer
  • A scientist conducted research and plotted his results in the histogram shown below. Which of the following is the best measure
    11·1 answer
  • Which list shows three components of an organ system in order of least complex to most complex?
    8·2 answers
  • Which of the following is not a primary concern when dealing with ethical issues related to modern day biotechnology? Group of a
    11·1 answer
  • When an organelle stops
    11·2 answers
  • The parasitic sac fungus that grows on rye and other grains and contains the hallucinogenic chemical lysergic acid is?​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!