Ankur Mehta
How you implement the runtime polymorphism using c++? Give an Exmple
By Ankur Mehta in OOP/OOD on Aug 30 2012
  • Pankaj  Kumar Choudhary
    Mar, 2015 31

    class demo { public virtual void call() { cout<<"Hello demo"; } }class Demo2:Demo { public void call() { cout<<"hello Demo2"; } }void main() { clrscr(); Demo1 ob=new Demo1(); Demo1 ob1 =new Demo2(); ob.Call(); ob1.Call(); getch(); }O/P: hello demo hello demo2

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS