Ask Question
Yesterday, 21:35

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

+2
Answers (1)
  1. Today, 01:00
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers