rahulhappy8886 rahulhappy8886
  • 14-09-2019
  • Computers and Technology
contestada

Dynamically allocatе mеmory for a DNA objеct and storе its addrеss in a variablе namеd dnaPtr

Respuesta :

ExieFansler ExieFansler
  • 20-09-2019

Answer:

 DNA obj =new DNA;//obj object created dynamically.

   DNA *dnaPtr=&obj.//dnaPtr to store the address of the object.

Explanation:

The above written statements are in C++.The DNA object is created dynamically and it is done in C++ by using new keyword which allocates the heap memory for the object.

Then a dnaPtr is created of type DNA so that it can store the address of the DNA objects.

Answer Link

Otras preguntas

The thief confessed that he had stolen the bricks from the site. What is the noun clause
a Brief Description of a Molecular signal
Which is smaller 0.9, 75% or 4 fifths?
each class at Briarwood elementary collected at least 54 cans of food during the food drive if there are 29 classes in the school what was the least number of c
Which two square roots are used to estimate square root of 8?
What is 5 and one fourth times three
What is the value of 3/5 of a £1?
A government-imposed curfew is one analogy for the American Revolution. Write another analogy that reflects what happened to trigger the colonists’ to revolt ag
What is .428571429 as a fraction?
The number of calories burned, "C", varies directly with the time spent exercising, "t". When James runs for 2 hours, he burns 800 calories. Which of the follow