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]
1 year 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]1 year 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
Ben Affleck has a cleft chin, but his ex-wife Jennifer Garner does not. Neither one of their two daughters (Violet and Seraphina
kherson [118]

Answer:

Ben - Y Xc

Jen - XCXC

Violet - XCXc

Seraphina - XCXc

Samuel- Y Xc

Explanation:

Given -

Ben has a cleft chin

Let the allele for cleft chin be "c"

and the allele for normal chin be "C"

When Ben with cleft chin mates with wife Jennifer Garner having normal chin, then the two girl child do not have cleft chin but the boy has cleft chin.

This means that the allele C could be X -linked and the mother is not the carrier but the father is

The genotype of father Ben would be Y Xc

Genotype of mother would be XCXC

Genotype of two daughters XCXc  , XCXc which means they are carrier for the next generation

Genotype of Boy - Y Xc

3 0
2 years ago
Megan examines a liver cell and observes an organelle with many smooth-
natulia [17]

Answer:

Processing and packaging of cellular materials prior to export

Explanation:

Our cells contain many different organelles. Every organelle has its own function, just like every organ in our bodies.

The Golgi apparatus is one of these organelles. It can be found in most eukaryotic cells. Its purpose is to transport, modify, and package proteins and lipids before they're delivered to other parts of the body. This is the function the organelle with smooth-sided channels Megan is observing would need to perform in order to be identified as the Golgi apparatus.

3 0
1 year ago
Which term describes the phenomenon that occurs when the expression of one gene pair masks the expression of another gene pair?
kotegsom [21]
It's called complete dominance of the dominant gene when it totally masks expression by the recessive gene.
4 0
1 year ago
Salvador would like to take a paternity test to determine if he is Pilar’s father. He asks Pilar’s mother, Antonia, to provide D
netineya [11]

Answer:

d. Autoradiographies

Explanation:

Based on the information provided within the question it can be said that the technique that is mainly used for this are Autoradiographies. This is a technique that is mostly used for X- ray film to visualize molecules or fragments of molecules that have been radioactively but are also used for  analyzing the length and number of DNA fragments using a special method called gel electrophoresis which is then used to compare the various DNA samples.

7 0
1 year ago
B. Eggs are known to contain cholesterol, which is a lipid. Did your experiment results indicate a presence of lipids in the alb
Darya [45]

Answer:

According to the result recorded, there was no cholesterol in the albumin solution. This is probably because the cholesterol is in the egg yolk and not the egg white. In order to get a positive response on the presence of cholesterol in eggs, an egg yolk albumin stock needs to be prepared. So using the same procedure as before and only replacing the egg yolk for the egg white, prepare a 0.5 mL of egg yolk with 4.5 mL distilled water mixture in a test tube. Follow the steps given in the lab manual to check for presence of lipids in this albumin stock. Take a filter paper and add one drop of Sudan III solution onto it, let it dry and then place a drop of the stock prepared and analyze if the color transfer happens.

Hope that answers the question, have a great day!

3 0
2 years ago
Other questions:
  • A museum exhibit is made up of a fish tank with propellers in the right and left sides and a control panel. When no buttons are
    12·2 answers
  • Why is the Earth’s core made up mainly of iron while the crust contains mostly silicate minerals?
    12·2 answers
  • A team of scientists is working to formulate a drug that can treat children who are diagnosed with gigantism. Which effect shoul
    12·2 answers
  • Explain how the model in the image supports this statement: The body carries out critical life functions through systems of spec
    14·2 answers
  • What process occurs in the citric acid cycle?
    11·1 answer
  • A team of biologists develop a new drug, and one team member hypothesizes that the drug is incapable of freely passing across th
    7·2 answers
  • A mutation is made once in every nucleotides copies
    15·1 answer
  • Dna never migrates from the nucleus to the cytoplasm to participate directly in protein synthesis. True or false
    8·1 answer
  • An amoeba is a single-celled organism that feeds on algae, plant cells, and bacteria. When an amoeba feeds, it first makes conta
    12·2 answers
  • Im stuck!!!!!!!!!!!!!! HELP?????????????????????????????????
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!