Create two objects: a rectangle and a square. Also, create a rectangle pointer named rptr and initialize it to nullptr.
This problem has been solved!
Do you need an answer to a question different from the above? Ask your question!
Question:
Create two objects: a rectangle and a square. Also, create a rectangle pointer named rptr and initialize it to nullptr. Then:
- point the rptr pointer to the rectangle object and use it to call the getName() function.
- point the rptr pointer to the square object and use it to call the getName() function.
Related Book For
View Solution
Create a free account to access the answer
Cannot find your solution?
Post a FREE question now and get an answer within minutes.
* Average response time.
Question Details
Chapter #
17
Section: EXERCISE
Problem: 6
Posted Date: September 16, 2023 06:14:47