answer.
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]
2 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]2 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
Which of the following represents the correct flow of air into the lung of a mammal?
7nadin3 [17]

I believe the answer would be A.

The flow is larynx, trachea, bronchi, bronchioles, alveoli

3 0
2 years ago
Which details from the text reflect the cultural context of the historical period in which Marco Polo wrote his travelogue? Chec
Novosadov [1.4K]

Answer:

B,C,D are correct answers

3 0
2 years ago
Read 2 more answers
Which of the following is and example of liverwort?
PSYCHO15rus [73]

The liverworts are a group of simple plants which are flowerless, spore producing plant.Their spores are produced in small capsules.
An example of liverwort is :
b. Marchantia 


5 0
2 years ago
Read 2 more answers
What is the relationship between CO2 and O2 for urchins?
Vedmedyk [2.9K]

Answer:

Sea urchins have a unique relationship of oxygen and carbon-di-oxide.

Explanation:

Sea Urchins spread oxygen in a unique way. They take in oxygen by staying inside water. Oxygen enters the body through their gills and tubed feet. CO2, which is waste is released through the anus. They get oxygen only through diffusion, i.e. diffusion of oxygen into the organism. Oxygen diffuses in body through the canals and carbon dioxide diffuses back into the canals. Urchins also have the capability to cope up with rising CO2 levels in the sea.

4 0
2 years ago
When voltage-gated sodium ion channels are inactivated, the neuron is _________________. in the absolute refractory period below
Ymorist [56]

Answer:

depolarizing

Explanation:

According to my research on studies by different medical professionals, I can say that based on the information provided within the question the neuron is depolarizing. This is what happens when voltage-gated sodium ion channels are inactivated causing an increas in the neuron's membrane conductance for sodium ions.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

5 0
2 years ago
Other questions:
  • In dna replication, each individual parent strand acts as a _____ strand for the synthesis of a _____ strand.
    8·1 answer
  • There are 36 possible outcomes when you roll two casino dice and record up-faces in order (first die, second die). fill in the b
    6·1 answer
  • The diagram below shows part of the process of DNA transcription. Which mRNA base will go in location 1?  A.Uracil B.Cytosine C.
    12·1 answer
  • The average annual rainfall for Boston is 43.76 inches. One year, a weather station measured the city's actual rainfall to be 33
    9·2 answers
  • Sicle cell disease (SCD) is found in numerous populations whose ancestral homes are in the malaria belt of Africa and Asia. SCD
    9·1 answer
  • Drag the labels to complete these sentences discussing the relationship between the work of Louts Pasteur and Joseph Lister. In
    8·1 answer
  • A geneticist is mapping the chromosomes of the newly captured gremlin. Stripe is heterozygous for three linked genes with allele
    9·1 answer
  • During exercise, sensory receptors detect changes in oxygen and carbon dioxide levels in the blood. This information is then sen
    7·2 answers
  • What two parts of a nucleotide do not ?change throughout the structure of DNA a. Five-Carbon Sugar and Phosphate Group b. Five-C
    8·1 answer
  • The processes of meiosis and fertilization help ensure the survival of the
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!