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
Which statement regarding the hypothalamus is FALSE?
Margarita [4]

Answer:

All the options are correct regarding hypothalamus.

Explanation:

The hypothalamus is the part of the forebrain. The diencephalon is divisible into 2 parts - thalamus and hypothalamus. It regulates various functions of the body.

This is the thermoregulatory center of the body. It gives the signal to sweat during a hot environment and shiver in winter. This maintains the water balance in the body by stimulating the secretion of ADH hormone in the kidney.

Hypothalamus also has regulated anterior pituitary hormone secretion. Thus it controls the endocrine secretion of pituitary glands.

This plays an important role in hunger and thirst. The feeding habits like the licking of lips, swallowing, and salivating by seeing delicious foods is due to hypothalamic activities.

The behavioral activities of individuals influenced by the hypothalamus.  It is worked along with the limbic system of the brain. The behavioral activities include fear, punishment and sexual desire.

6 0
3 years ago
In eukaryotic gene regulation, RNA interference occurs through:
Anit [1.1K]

Answer:

B. the action of microRNAs that block translation of specific mRNA molecule

C. the action of RNA–protein complexes that degrade the regulatory proteins responsible for initiating transcription.

Explanation:

RNA interference occurs what RNA prevent the translation of some gene this is done by neutralizing target mRNA molecule. It suppresses the effects of some desires genes through its action.

MicroRNA and small interfering RNA (miRNA and siRNA) are the major RNA that controls interference. siRNA and miRNA prevent translation by directing some enzmes complexes to denature the mRNA molecule needed for translation. They intiate post transcriptional splicing.

RNA interference is found in eukaryote and some animals and its initiated by enzyme Dicer that inhibits translation by degrading the enzymes action.

5 0
3 years ago
Read 2 more answers
Corals and the algae that live in coral polyps have a special relationship. Each contributes something that the other needs to s
scoundrel [369]
The coral provides the algae with a protected safe environment (a home) and compounds they need for photosynthesis. The algae in return, produce oxygen and help the coral to remove wastes. Most importantly, zooxanthellae supply the coral with glucose, glycerol, and amino acids, which are the products of photosynthesis.
7 0
3 years ago
What are the functions of the three major forms of RNA (ribosomal RNA, messenger RNA, and transfer RNA)?
vovangra [49]

Answer:

Ribosomal RNA: Structural part of ribosomes

Messenger RNA: Carry genetic information from DNA to proteins

Transfer RNA (tRNA): Transport amino acids to protein synthesizing complex.

Explanation:

Ribosomes are made up of ribosomal RNA (rRNA) and proteins. The catalytic activity for the formation of peptide bonds between amino acids during protein synthesis resides the RNA of ribosomes.  

Messenger RNA (mRNA) is formed by the process of transcription during which the nucleotide sequence of the template DNA strand is copied into that of the RNA. The mRNA serves as a template for protein synthesis. The nucleotide sequence of mRNA is read in the form of genetic codes to specify the amino acid sequence of a protein. In this way, the genetic information stored in DNA is carried to the proteins.

During the process of protein synthesis, tRNAs carry amino acids to the mRNA-ribosome complex so that the amino acids are incorporated into the polypeptide. For the purpose, there is a tRNA with a specific anticodon sequence for a particular amino acid.  

3 0
3 years ago
What does alternative energy mean ?
Kitty [74]

energy generated in ways that do not deplete natural resources or harm the environment, especially by avoiding the use of fossil fuels and nuclear power.

8 0
3 years ago
Other questions:
  • Where in the body can you find connective tissue?
    10·2 answers
  • Many cultures and religions have customs which deal with the way they use the land. For example, in Judaism, it is required that
    12·2 answers
  • Which is true about a daughter cell produced by mitosis?
    6·1 answer
  • Approximately half of human body weight is composed of _______ muscle tissue.
    8·1 answer
  • Quarrying and solar evaporation are included in which type of mining?
    5·1 answer
  • What is best described as localized, purulent, inflammatory infection of the sebaceous gland of the eyelid?
    13·1 answer
  • Write the complimentary strand of DNA A C G T C C G A
    5·2 answers
  • Create a food chain that contains four organisms from a producer through three consumers using corn, rabbit, grass, wolf, snake,
    8·1 answer
  • The atmosphere of Earth today primarily contains the following gases: carbon dioxide (CO2), water vapor (H2O), nitrogen (N2), an
    10·1 answer
  • Which endocrine organ is responsible for the production of adh oxytocin and regulatory hormones?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!