derived class

5 Comments

C++ program to implement Pure Virtual Functions

AIM A program to demonstrate how a pure virtual function is defined, declared and invoked from the object of derived class through the pointer of the base class. ALGORITHM 1. Start the process 2. Invoke the class with pointer 3. Assign ptrgetdata() a. Get the roll no and name of the student 5. Call the […]

No Comments

C++ program to illestrate virtual functions

AIM A program to access the member of the derived class objects through an array of members. In this program, both the base class and the derived class member functions are preceded by the keyword ALGORITHM 1. Start the process 2. Invoke the class with pointer 3. Assign ptr[0]