C++ Programming - OOPS Concepts - Discussion

Discussion Forum : OOPS Concepts - General Questions (Q.No. 3)
3.
Which of the following statements is correct?
Base class pointer cannot point to derived class.
Derived class pointer cannot point to base class.
Pointer to derived class cannot be created.
Pointer to base class cannot be created.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
41 comments Page 5 of 5.

Thrineshneeraj said:   8 months ago
The base class pointer can point to base class objects and derived class objects.

To access the base part, which is in a derived class, the base class uses its pointer.

So vice versa is not there. i.e. there is no derived class part in the base class, so the derived class pointer cannot access the base class.
(5)


Post your comments here:

Your comments will be displayed after verification.