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
if you wanted to test red blood cells for their ability to complete glycolysis, what compound would you try to detect
Artemon [7]

Answer:

Pyruvate

Explanation:

Glycolysis refers to the pathway through glucose is oxidized to pyruvate.

In glycolysis, a molecule of glucose passes through ten enzyme catalyzed steps to yield two molecules of pyruvate.

Step 1: Glucose is phosphorylated to form glucose-6-phosphate

Step 2: Glucose-6-phosphate is converted to fructose-6-phosphate

Step 3: Fructose-6-phosphate is further phosphorylated to form fructose-1,6-bisphosphate

Step 4: Fructose-1,6-bisphosphate is cleaved into glyceraldehyde-3-phosphate and dihydroxyacetone phosphate

Step 5: Dihydroxyacetone phosphate is converted to another molecule of glyceraldehyde-3-phosphate.

Step 6: Two molecules of Glyceraldehyde-3-phosphate are converted to two molecules of 1,3-bisphosphoglycerate

Step 7: Two molecules of 1,3-bisphosphoglycerate are converted to 3-phosphoglycerate

Step 8: Two molecules of 3-phosphoglycerate are converted to two molecules of 2-phosphoglycerate

Step 9: Two molecules of 2-phosphoglycerate are converted to two molecules of phosphoenolpyruvate

Step 10: Two molecules of phosphoenolpyruvate are converted to two molecules of  pyruvate, the end-product of glycolysis.

Therefore, the presence of pyruvate molecules in red blood cells can be used to test for their ability to complete glycolysis

6 0
2 years ago
What would be the impact on the nitrogen cycle if there were a decrease in decomposition in a given ecosystem?
Masteriza [31]
Because decomposition helps create nitrogen, a lack of decomposition would result in a lack of nitrogen being created.
7 0
2 years ago
A mining company received government permission to purchase land for surface mining activities. This land was previously used by
Dovator [93]

Answer:

The answer is Make reclamation required after mining operations have ended

Explanation:

If a company has removed the minerals out of the mining place, mined areas must go through reclamation, which returns land to a usable state after mining operations have ceased.

4 0
2 years ago
Maria wanted to grow a fern in her backyard. Acting on a suggestion from a friend, she collected brown dots from the underside o
blsea [12.9K]
The little dots collected from under the fern leaves are spores, not seeds. Ferns are different from seed-bearing plants in that ferns in a sexless way through sporophyte generation. Spores dropped from or taken from grown fern leaves have developed prothallium. Each prothallium generates male and female organs in what is called the gametophyte stage. When fertilization of the female gametophyte happens, small fern plants or leaflets start to grow.
5 0
2 years ago
Read 2 more answers
Week 1
Bess [88]

Answer:

9 cm for controlled, 8cm for experimental, and -1 for the last one that pops up when you submit one and two.

Explanation:

I got it right on EDG.2020

6 0
2 years ago
Read 2 more answers
Other questions:
  • In photosynthetic cells, synthesis of atp by the chemiosmotic mechanism occurs during _________.
    15·1 answer
  • Tay-sachs disease causes lysosomes to rupture. how would this affect the cell? check all that appl
    8·1 answer
  • No matter what the cell type, prokaryotic or eukaryotic, plant or animal, the ____________ forms a protective barrier between th
    13·2 answers
  • Drag each tile to the correct box. The flu vaccine activates adaptive immunity. How does this occur? Antibodies are quickly prod
    5·2 answers
  • The part of a cell that is in most direct contact with the environment is the (a) nucleus (b) cell membrane (c) mitochondrion (d
    9·2 answers
  • If a negatively charged ion is more concentrated outside the cell, the forces required to balance the chemical gradient would be
    12·1 answer
  • Match each cardiac valve with the two chambers it separates. Each pair of chambers may be used more than once, or not at all. tr
    10·1 answer
  • Are there any similarities between this Galapagos research and Darwin’s research? Explain your answer.
    10·2 answers
  • For each cross, describe whether genetics or temperature determines the sex of progeny produced from eggs incubated at 35 degree
    8·1 answer
  • This is a high school Biology class taught by teacher Ellen Quigley. The students will soon be taking the state End of Course Bi
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!