Modify the existing vector's contents, by erasing the element at index 1 (initially 200), then inserting 100 and 102 in the shown 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:

Answers

Answer 1

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.


Related Questions

How is metaphase of mitosis different from metaphase I of meiosis?

Answers

Answer:

Metaphase I in Meiosis

The homologous pair is a representation of the same DNA but has different alleles. The homologous pairs will attach to each other during metaphase I and they undergo the alignment on the metaphase plate, unlike in mitosis where the sister chromatids are the ones that align on the metaphase plate.

In metaphase I of meiosis they undergo the alignment on the metaphase plate, unlike in mitosis where the sister chromatids are the ones that align on the metaphase plate.

A car moves at a speed of 50 kilometers/hour. Its kinetic energy is 400 joules. If the same car moves at a speed of 100 kilometers/hour, then its kinetic energy will be

Answers

Answer:

1601.33J

Explanation:

Kinetic energy = 1/2 × mv²

Where;

m = mass (kg)

v = velocity (m/s)

To calculate the kinetic energy of the same car at a different speed, we initially need to calculate the mass of the car.

The initial velocity of the car is 50km/hr = 13.89m/s, while the kinetic energy is 400Joules

K.E = 1/2 × mv²

400 = 1/2 × m × 13.89²

400 = 1/2 × m × 192.93

400 = 96.466m

m = 400/96.466

m = 4.15kg

Mass of the car is 4.15kg

K.E = 1/2mv²

If velocity = 100 kilometers/hour = 27.78m/s

K.E = 1/2 × 4.15 × 27.78²

K.E = 1/2 × 3202.67

K.E = 1601.33J

Answer:

1600j

Explanation:

ke prop to v^2

ke1/v1^2=ke2/v2^2

400/50x50=joules/100x100

400x2x2

4. In this investigation oxygen production was used to measure the light reaction. What are
two additional products that could be measured? What purpose do they serve in the light-
independent (dark) reaction?

Answers

Answer:

Photosynthesis is the process by which green plants absorb light energy from the sun with the assistance of water and carbon dioxide, and transform it into chemical energy to make (synthesize) carbohydrate (specifically glucose) and oxygen.

The "light-independent" or dark reactions happen in the stroma of the chloroplasts. This is also known as the Calvin Cycle. Since these processes can only happen in the chloroplast (a chlorophyll filled plastid in green plants), photosynthesis can only happen in green plants!

The first overall principle of photosynthesis is that the light energy from the sun is transformed into chemical energy and stored in the bonds of glucose (the sugar carbohydrate) for later use by the plant and/or organism that eats the plant.

The second overall principle of photosynthesis is that carbon, oxygen, and hydrogen atoms are taken from carbon dioxide and water molecules and are broken up and rearranged into new substances: carbohydrate (specifically glucose) and oxygen gas (so we can breathe, whew!). This reaction represents the transfer of matter: carbon dioxide from the atmosphere, water from the soil or atmosphere, into sugar in the plant and oxygen back into the atmosphere.

Light-Dependent Reactions

The first part of the process happens in the thylakoids of the chloroplasts and are the "light-dependent" reactions: The photosystems I and II absorb the photons from the sunlight and process them through the membranes of the thylakoids simultaneously. The photons excite electrons in the chlorphyll which then move through the electron transport chain and causes NADP- to combine with H+ forming NADPH. At the same time, ADP (adenosine diphosphate) has come from the dark reaction and a third phosphate chain is bonded forming ATP (adenosine triphosphate) to feed the Calvin Cycle next. Remember that ATP is the important source of all cellular energy.

We now believe that all the oxygen released in photosynthesis comes from the water molecules and all oxygen atoms that form the carbohydrates come from the carbon dioxide molecules. So, in other words during the light-dependent reaction a water molecule is broken down producing two H+ ions and half an oxygen molecule. We get the rest of the oxygen molecule when another water molecule is broken down.

Dark Reactions

Dark reactions are also known as the Calvin Cycle, the Calvin-Benson cycle, and light-independent reactions. The point is that they do not require sunlight to complete their process.

After ATP is formed in the first part of photosynthesis, for living things to grow, reproduce and repair themselves, the inorganic form of CO2 must be transformed into carbohydrate. This happens during the Calvin Cycle in the stroma (the fluid filled interior of the chloroplast). ATP and NADPH combine with CO2 and water to make the end product of glucose. The ADP and NADPH+ are recycled to the light-dependent side to start the process over.

Remember that during hours of darkness, plants cannot perform photosynthesis so they do cellular respiration in the mitochondria just as all living organisms do.

Explanation:

I hope this helps

When skin is exposed to certain ultraviolet rays, the cells produce more melanin, causing the skin to darken. Over time, the cells can be damaged by these ultraviolet rays, which can lead to skin cancers. Which conclusion can most likely be drawn about the rates of skin cancer?

A. Skin cells with a low concentration of melanin have the lowest risk of developing into cancer cells.

B. Skin cells with a high concentration of melanin have the highest risk of developing into cancer cells.

C. Skin cells with a low concentration of melanin have a lower risk of developing into cancer cells than cells with a high concentration of melanin.

D. Skin cells with a high concentration of melanin have a lower risk of developing into cancer cells than cells with a low concentration of melanin.

Answers

Answer:

C

Explanation:

i think

Answer:

c

Explanation:

Which of the following is mainly responsible for the removal of carbon dioxide from the atmosphere? A. animals B. factories C. soil D. plants

Answers

Answer:

D. Plants

Explanation:

They get the Carbon Dioxide for photosynthesis

The Answer would be D, plants take in carbon dioxide during the day and release oxygen. In a process called “photosynthesis,” plants use the energy in sunlight to convert carbon dioxide and water to sugar and oxygen.

graph of light colored and dark color pepper moth survival rate post industrial;

Answers

Answer:

Explanation:

what

do nucleotide bonds dehydrate plants? i just need a yes or no answer

Answers

Answer:

no

Explanation:

idk

Lab: Mouse Genetics (One Trait) a whole lab!!!
plzzzzz i need ur helpl guys

Answers

A Mouse is considered the model organism for conducting experiments related to humans.

What do you mean by traits?

The appearance or manifestation of a character is known as a trait. It is also known as a Phenotype.

A lab is used to demonstrate the experiments based on a specific area of interest. Here, the experiments of mouse genetics are conducted in the lab to investigate the outcome of genotype and phenotype by using a Punnett square.

Therefore, it is required to develop certain traits while performing the experiment on mouse genetics in a lab.

To learn more about Mouse Genetics, refer to the link:

https://brainly.com/question/3353350

how is the structure of a caesium-134 atom different from the structure of an caesium-137 atom?

Answers

Answer:

Favorite Answer

Cs-134 has three fewer neutrons than Cs-137. Cs is element 55, meaning these isotopes have 79 and 82 neutrons, respectively.

P-32 has one more neutron than P-31. P-32 has 17 neutrons, and P-31 has 16.

If a company developed a way to modify a person's DNA to guarantee certain attributes in offspring, should that company be forced to make their technology available to everyone who wanted it? What are some of the ramifications of widespread use of this type of genetic engineering technology on humankind?​

Answers

Yes, however, random people should not just be taught because people have a tendency to not follow every step, and can hurt themselves. I learned about this, and that if you modify a persons DNA, that's permanent. If you messed up, your offspring could be impacted. This is why we don't just give out information, because people are afraid that if we messed up, we could end the world or something.

Rain and running water can erode soil. From which area is soil most likely to be eroded?


A. sloping area with bushes

B. flat area with grasses

C. flat area that is barren (without plants)

D. sloping area that is barren (without plants)

Answers

Answer: The answer is A

Explanation: Just verifying that hes right.

All atoms of the same element have the same number of ___________, which is called the atomic number.

Answers

The answer is “ protons “ lol

Number 17 PLEASE HELP 20 points if u right dont just take the points please or i will report you

Answers

Answer:

i think the answer is G Large Central Vacuole

Explanation:

Answer:

This is a mitochondrion!

Explanation:

Mitochondria can always be recognized by their internal folds. Hope this helps!

Which scenario best describes motion?

A. a toy train in position 4 on a number line.
B. a race track that is 100 meters long.
C. a ball rolling from point A to point B.
D. a student living 150 miles from Chicago.

Answers

Answer:

c. a ball rolling from point A to point B

Explanation:

a is talking about the position of the train

b is talking about the length of the track

d is talking about the distance a student is from somewhere.

So from taking all these options out we are left with C because the ball is actually moving and when something moves it is in motion.

Explain how the energy used by an athlete during a football game comes from the energy of sunlight. PLEASE ANSWER

Answers

because they receive vitamin D giving them nutrients and energy.

Energy transformation shown in the picture 10 points !!

Answers

Electrical to thermal

Some ovens use electricity converted into heat energy to cook food
The answer is C
It’s C because the way a oven works it that it takes the electricity and converts it to heat. Therefore electricity turns into thermal energy

The uterus is an organ within females that is part of which body system?

A.Digestive
B.Immune
C.Excretory
D.Reproductive


The kidneys and bladder are part of which body system?

A.Circulatory
B.Muscular
C.Excretory
D.Immune



Which of the following is not a function of the excretory system?

A.Controls water balance in the body
B.Processes food for use by the body
C.Excretes waste from the body
D.Remove waste from blood

Answers

1. The answer is D, Reproductive.

2. The answer is C, Excretory.

3. The answer is B, Processes food for use by the body.

Explain the differences and similarities among these abiotic and biotic processes in terms of the changes in entropy and heat that contribute to the free energy extracted from chemical bonds, the spontaneity of each, and the role of catalysis.

Answers

Answer:Explain the differences and similarities among these abiotic and biotic processes in terms of the changes in entropy and heat that contribute to th

Explanation:

Currently, what is a major source of ocean pollution? How much
more pollution is occurring compared to 1960?
plz help. need this answered 4 science.

Answers

Answer:

Most ocean pollution begins on land.

Much of this runoff flows to the sea, carrying with it agricultural fertilizers and pesticides. Eighty percent of pollution to the marine environment comes from the land. One of the biggest sources is called nonpoint source pollution, which occurs as a result of runoff.

Answer:

Plastic pollution: The ocean is estimated to contain millions of tons of plastic debris, much of which comes from land-based sources.Chemical pollution: The ocean is also contaminated with a wide range of chemicals, including pesticides, herbicides, and industrial and household chemicals.Nutrient pollution: Excess nutrients, such as nitrogen and phosphorus, can enter the ocean from agricultural and urban runoff and contribute to the growth of harmful algal blooms.Oil pollution: Oil spills and other oil discharges into the water can have a negative effect on the animals and marine ecosystems there.

Explanation:

https://www.quora.com/What-percent-of-the-ocean-is-polluted

Raj made the timeline below to show the progression of thinkers who developed theories about Earth's place in the universe. ? À Copernicus à Galileo à Newton Which thinker belongs at the beginning of Raj's timeline? Aristotle Kepler Ptolemy Thales

Answers

Answer:

Ptolemy

Explanation:

Ptolemy is the earliest earliest astronomer and mathematician in the list who lived and worked in the second century AD. Nothing is known about his personal life but his scientific work is well known.

He made his observations using naked eyes. In his opinion, the Universe is ''a set of nested, transparent spheres, with Earth in the center.''(Khan Academy). His argument was that the Moon, Mercury, Venus, and the Sun were all revolving around around Earth.

Although Ptolemy made significant contributions in Astronomy but he was wrong in positing that the earth did not move at all. This is inconsistent with our present day knowledge about the celestial bodies. Also, his work missed out other planets that were yet to be discovered then such as Uranus, Neptune, Pluto etc.


4. Which of the following describes how a large mouse population with high genetic
diversity will most likely be affected by a sudden, significant environmental change?
(SB6d)
A. All of the individuals within the population will reproduce at a higher rate, leading
to a decrease in genetic diversity.
B. New traits will arise as a result of new selective pressures in the environment,
leading to an increase in genetic diversity.
C. Only those individuals best adapted to the new environment will survive and
reproduce, leading to a decrease in genetic diversity.
D. Only some individuals will develop traits to help them survive in the new
environment, leading to an increase in genetic diversity.

Answers

D I think .... I hope

BRAINLIT


Mineral.

(a) tilting, (b) Erosion, (c) Folding

Answers

Answer:

folding

Explanation:

What lab tools are present in the picture?

A.

ring stand, ring clamp, wire gauze, erlenmeyer flask, bunsen burner

B.

balance, beaker, tongs, filter paper, bunsen burner

C.

ring stand, tongs, watch glass, flint striker, erlenmeyer flask

D.

balance, beaker, wire gauze, hot plate, forceps

Answers

Answer:

the correct answer is A.

Lab tools present in the picture are ring stand, tongs, watch glass, flint striker, erlenmeyer flask.Thus, option C is correct.

What are the safety measures that should be taken in laboratory?

There are several safety measures that should be taken while performing an experiment in lab such as avoid drink and food while working in laboratory and wear PPE kit to keep yourself safe.

Never work lonely in the lab because this condition will turn into danger situation as suppose a person works lonely and due to reaction of some chemical the person become unconsious than there is no one to help him.

Always wear gloves, PPE kit, proper shoes, lab coat of full sleeves with safety goggles. All these things will helps to keep a person safe in lab while experiment.

Therefore, Lab tools present in the picture are ring stand, tongs, watch glass, flint striker, erlenmeyer flask.Thus, option C is correct.

Learn more about safety measures in laboratory here:

brainly.com/question/17303366

#SPJ2

pls help me with this questions.

Answers

A. Karyokinesis is defined as the division of the nucleus during the M phase of the cell cycle. It is the first step in M phase.

B. Cytokinesis is the physical process of cell division, which divides the cytoplasm of a parental cell into two daughter cells.

C. Interkinesis is a period of rest that cells of some species enter during meiosis between meiosis I and meiosis II. No DNA replication occurs during interkinesis.

HELP! Transcribe the following DNA base code into the complementary mRNA codons: TACAATCCGCAT

Answers

the correct answer is AUGUUAGGCGUA

how are sex linked traits determined

Answers

Answer:

A sex-linked trait refers to genes that determine a specific structural or functional characteristic and are found on an X or Y sex chromosome.

Explanation:

The X and Y sex chromosomes are what determine the sex of an individual, XY for male and XX for female. A sex chromosome-linked trait refers to specific genes located on one of the sex chromosomes.

In general, the X sex chromosome is capable of having more traits linked to it because it is larger than the Y chromosome.

Genes are what determine the morphological and functional characteristics of an individual. When specific genes are found on a sex chromosome, the traits that they determine will be given to the offspring through that chromosome.

Our brains, nerves, and spinal cords are made up of specialized cells that you don't find anywhere else in
the body.
True or false?

Answers

Answer:

TRUE

Explanation:

Central to the functioning of the nervous system is an extensive network of specialized cells called neurons, There are basically two major types of nerves: sensory and motor. Sensory nerves send information such as touch, temperature, and pain to the brain and spinal cord., Sensory neurons carry nerve impulses from tissues and organs to the spinal cord and brain. Motor neurons carry nerve impulses from the brain and spinal cord to muscles and glands(see Figure below). Interneurons carry nerve impulses back and forth between sensory and motor neurons.

pls give me brainliest i really need it

and good luck on your work

Our brains, nerves, and spinal cords are made up of specialized cells that you don't find anywhere else in the body is a true statement.

What is brain?

The brain, spinal cord, and a sophisticated nerve network are all parts of the nervous system. The brain and the body are communicated with via this system.

All bodily functions are managed by the brain. From the brain, the spinal cord descends via the back. It is made up of strands of nerves that branch out to every organ and area of the body.

The brain sends and receives messages via this network of nerves to many regions of the body.

Therefore, Our brains, nerves, and spinal cords are made up of specialized cells that you don't find anywhere else in the body is a true statement.

To learn more about brain, refer to the link:

https://brainly.com/question/11950231

#SPJ2

Choose all the answers that apply.

The cerebrum is _____.

(A) the center of intelligence and thought
(B) covered by a thin layer of gray matter
(C) connected to the sensory organs
(D) divided into two hemispheres
responsible for balance and reflexes

Answers

Answer:

The cerebrum is connected to the sensory organs, divided into two hemispheres, and responsible for balance and reflexes. I hope this helps!!!!!

Explanation:

I know this because I got it right in my test I hope this helps people!!!!!!!!!!

(And I just learned about the cerebrum last week!!!!!!!)

What evidence from geology, or the structure and history of planet Earth, influenced Darwin? *
evidence indicating that volcanoes contribute to natural selection
evidence showing that the center of Earth is liquid
evidence showing that rocks can change from one type to another
evidence indicating that Earth was much older than was previously believed

Answers

Answer:

the evidence that influenced Darwin was the evidence indicating that volcanoes contribute to natural selection and evidence showing that rocks can change from one type to another after all he was a geologist and he saw various changes on the earth and it might've look a bit older than we thought

which organisms need to make or consume some sort of food or provide of the energy their cells need

a)only plants
b)only animals
c)all living things
d)most living things

Answers

Answer:

c.

Explanation:

food is energy for an organism

hope this helps!

Answer:

all living things

Explanation:

because all living thing provide

Other Questions
p.s 15 points Which best describes the solution to 4 minus 7? Because Negative 4 + (negative 7) is an equivalent expression, the answer is 11. Because 4 + (negative 7) is an equivalent expression, the answer is 3. Because 4 + (negative 7)is an equivalent expression, the answer is 11. Because Negative 4 + (negative 7) is an equivalent expression, the answer is 3. *Sketchup - housePush Pull - letter Z keyPush Pull - letter P key A cab company charges $3 per cab ride, plus an additional $1 per mile driven. How long is a cab ride that costs $20? The value of y varies directly with x, when y = 2 and x = 3. What is the equation for this relationship? What is the value of y when x = 18? If Chris runs 7 miles each hour, how far will he run in 8 hours?A. 63 milesB. 56 milesC. 49 milesD. 15 miles what is car in spanishpls help tommarow i have to turn this in and i have no idea what it is which of these is not a mixture a.) baking soda b.)salt and waterc.)metal paper clips and plastic paper clips The perimeter of a rectangle is 80 cm. The width is 10 cm more than twice the length. Whatis the length and width of this rectangle? P=2W+2L how are teachers and parents alike and different A water feature that could be a source of groundwater for humans is found at a location on a hillside where Earths surface is lower than the water table.What type of feature might be observed at this location?springaquiferartesian wellunsaturated zone The hypotenuse in this triangle is equal toA. 90 degreesB. 15C. 12D. 9 Given the function f(x)= 2x-3 find f(-1)A. f(-1)= -2B. f(-1)= -5C. f(-1)= -1 x + 1 - x = 1Solve the equation Thanks Which of the following describes the "situation" in the accident chain? A. The circumstance leading to the accident B. The result from an unsafe act or unsafe health habit C. The consequence of one or more risk factors D. The result of the accident A force of 250 N is applied to a hydraulic jack piston that is 0.02 m in diameter. If the piston that supports the load has a diameter of 0.15 m, approximately how much mass can be lifted by the jack? Ignore any difference in height between the pistons. A) 250 kg B) 700 kg C) 1400 kg D) 2800 kg E) 5600 kg Why do you think project management is more necessary NOW than in the past? Write your response in 10 or more sentences. To help you with your response, give examples of what time management is necessary, and when not having time management can be detrimental to achieving a goal. A person who weighs 100 pounds on Earth weighs 16.5 pounds on the moon. If a boy weighs 60 pounds on Earth, how much does he weigh on the moon? someone please help me and explain What are the 3 forces that make the tectonic platesmove Explain how the issue of supply and demand impacted both the American colonies and England during the Revolutionary period. Provide at least three supporting details in your answer.