Page 1 of 1

Part A > Assume that class B is derived publicly from class A which is abstract. > The member functions that are private

Posted: Tue Jul 12, 2022 8:21 am
by answerhappygod
Part A
> Assume that class B is derivedpublicly from class A which is abstract.
> The member functions that are privatein class A will be private/protected/public/not directly accessiblein class B.
Part B
> Assume that you have a class that hasan integer pointer as a private member.
> One of the member functions willdynamically allocate memory memory and assign the address to thatmember.
> Assume that an object of that classtype is instantiated and the function called to allocatememory.
> When the object reaches the end ofit's scope - will the memory that has been allocated be releasedautomatically? If not, how would you create a mechanism toaccomplish this. Be specific.