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
This sample can then be sent to a lab for ____________ , so the cells can be observed under a microscope for abnormalities.
Tresset [83]

Answer:

Histological examination

Explanation:

This sample can then be sent to a lab for histological examination , so the cells can be observed under a microscope for abnormalities.

Histological examination Involves the careful analysis of cells and tissues usually under a microscope to determine if there is any problem.

6 0
3 years ago
10 POINTS! science plz help me!
saul85 [17]

An increase in genetic variation

6 0
4 years ago
I dont know what to do can someone please help me ASAP
ANTONII [103]

Answer:

In the explanation. :)

Explanation:

Human powered generators are the best source for the rescue team. We cannot always depend on the sun. What if the sun is not out that day? What if it's a rainy day? What if the sun is what's causing the rescue team to come out? Human powered generators are sometimes untrustworthy, but at the same time we know that at least it's a step away. We don't have to wait all-day for the sun to help out. Of course, the energy from the sun is always going to be there and won't cause anybody hurt, harm, or danger, but at the same time we can always convert to human powered generators and they'll work just as perfect.

Hope this helps, have a great day!

4 0
3 years ago
Name a structure that is located toward the dorsal side of the body, lateral and superior to the hamstring but inferior to the h
sdas [7]

Answer: Kidney

Explanation:

Kidney is a structure that is located toward the dorsal side of the body, lateral and superior to the hamstring but inferior to the heart.

The kidneys are a pair of bean shaped organs that are located at the downward part of the rib cage. The body of humans consists of two kidneys one kidney on each side of the spine and they're responsible for the filtering of excess water, waste products, and other impurities out of the human body.

8 0
3 years ago
What effects would you expect uncontrolled celiac disease to have on children? How do these effects relate to what is shown in t
Umnica [9.8K]

Answer:

to the lining of his small intestine when any food containing gluten –are ingested.

8 0
3 years ago
Other questions:
  • All the information needed to make proteins is coded in DNA by
    8·2 answers
  • Which type of sensory receptor responds to the distortion or bending of tissue?
    6·1 answer
  • Neurotransmitters are molecules that cross the synapse. True or False?
    15·1 answer
  • Transcription in both eukaryotes and prokaryotes is similar because
    15·1 answer
  • Sciatica is inflammation of the sciatic nerve that results in pain, burning and tingling along the course of the affected sciati
    15·1 answer
  • The group of polar bears that live along the eastern coast of Russia makes up<br> an organism.
    6·1 answer
  • Wich structural adaptation would help a plant survive better in a shady environment
    6·1 answer
  • Which of the flowing best describes how reduced space affects the animals in an environment?
    15·2 answers
  • 1. A plant tissue cells are elongated and thickened with cellulose strips at the corners.
    6·1 answer
  • Which of the following is a better mining alternative to Open-cast mining?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!