Ask Question
25 April, 23:14

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

+4
Answers (1)
  1. 25 April, 23:29
    0
    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.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Dynamically allocatе mеmory for a DNA objеct and storе its addrеss in a variablе namеd dnaPtr ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers