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
A caterpillar eats only plants. a robin eats the caterpillar. what is the role of the robin in this system? A: Producer B:Decomp
dmitriy555 [2]
I think is D.... But I will double check
5 0
2 years ago
Read 2 more answers
After injuring his knee, Kai began having pain and numbness in his lower leg. The doctor said the injury damaged nerves that run
Igoryamba

Answer:

Nervous system

Explanation:

The nervous system consists of the the brain and the nerves and the damage was done to the nerves that run all the way down his leg.

4 0
2 years ago
Read 2 more answers
Drag labels at left into the appropriate targets on the right to complete this concept map about oxidative phosphorylation
almond37 [142]

*The key function of each of the two photosystems is to absorb light and convert the energy of the absorbed light into redox energy, which drives electron transport.

In PS II (the first photosystem in the sequence), P680 is oxidized (which in turn oxidizes water), and the PS II primary electron acceptor is reduced (which in turn reduces the electron transport chain between the photosystems).

In PS I, the PS I primary electron acceptor is reduced (which in turn reduces other compounds that ultimately reduce NADP+ to NADPH), and P700 is oxidized (which in turn oxidizes the electron transport chain between the photosystems).

8 0
1 year ago
A terrarium is a small, enclosed ecosystem. If you change certain aspects of the terrarium, the climate that exists inside it wi
Free_Kalibri [48]

Answer: Add a different diet and maybe add an animal. If you put a bigger water bowl than the cage will become humid. If you change things about the terrain, its a desert so watering more plants and planting trees will make the ground more fertile to other plants. If you continue to take care of the plants until they are able to grow and reproduce. After enough time, where used to be a desert there will be a forest.

6 0
1 year ago
Read 2 more answers
Complement proteins and antibodies coat a microorganism and provide binding sites, enabling macrophages and neutrophils to phago
Alexandra [31]
<h2>Opsonization Process</h2>

Explanation:

  • Opsonization is right answer
  • Antibodies coat a microorganism and Complement proteins provide binding sites, neutrophils  and enabling macrophages to phagocytize the organism.This phenomenon is termed <u>opsonization</u>
  • Opsonization (likewise, opsonization) is the sub-atomic system such as <em>organisms, or apoptotic cells and molecules</em> are chemically modified to have a more stronger attraction for the cell surface <em>receptors on NK cells and phagocytes </em>With the antigen-covered in opsonins, binding to immune cells is greatly enhanced
  • Opsonization occurs through the connection of an opsonin to an epitope of the pathogen or dead cells
  • Secure cells and pathogens all have contrarily charged cell membranes
4 0
2 years ago
Other questions:
  • Scientists once believed that Tyrannosaurus rex dragged its tail along the ground. Today, they know that T. rex did not drag its
    14·2 answers
  • Most ocean-water usage is for _____. mining industry desalination power plants
    9·2 answers
  • What type of reasoning involves using many specfic piece of evidence to make generalizatons?
    6·1 answer
  • Psychologists suspect that _____ often results from growing up in below-average intellectual environment.
    13·2 answers
  • Which of the following set of characteristics accurately describes the phylum cnidaria?
    8·2 answers
  • How does the simple primary and secondary structure of dna hold the information needed to code for the many features of multicel
    12·1 answer
  • What is part of the third step in troubleshooting a computer problem?
    5·2 answers
  • While on a field trip near the ocean coastline, you visit a company that harvests jellylike substance from protists. This substa
    13·1 answer
  • You are studying green colorblindness in your family (colorblindness is recessive and on the X-chromosome).
    8·2 answers
  • Hypothesize how the properties of water protect the aquatic organisms living in a temperate-
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!