You have one base class virtual function how will call that
function from derived class?

Answers were Sorted based on User's Feedback



You have one base class virtual function how will call that function from derived class?..

Answer / kalaivani

u can call the base class virtual fn,if it is declare as
public

Is This Answer Correct ?    4 Yes 0 No

You have one base class virtual function how will call that function from derived class?..

Answer / narendra

class A
{
public:
virtual void fun()
{
cout<<"class A\n";
}
};
class B:public A
{
public:
virtual void fun()
{
cout<<"class B\n";
A::fun(); //calling base class virtual function.
}
};

Is This Answer Correct ?    4 Yes 2 No

You have one base class virtual function how will call that function from derived class?..

Answer / swetcha

class a
{
public virtual int m()
{
return 1;
}
}
class b:a
{
public int j()
{
return m();
}
}

Is This Answer Correct ?    4 Yes 4 No

You have one base class virtual function how will call that function from derived class?..

Answer / mazher

class B:A
{
public override void A_Func()
{
base.A_Func();
}
}

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More OOPS Interview Questions

What is the fundamental idea of oop?

0 Answers  


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

2 Answers  


What is the difference between pass by reference and pass by value?

12 Answers   Pfizer, TCS,


Difference ways of Polymorphism?

3 Answers  


Is following functions are said to be overloaded? int add(int a,int b) char *add(int a,int b)

4 Answers  






What is an advantage of polymorphism?

0 Answers  


what is object oriented programming and procedure oriented programming?

3 Answers  


what are the ways in which a constructors can be called?

2 Answers   TCS,


should we use linear search or binary search if elements are placed in random order or mixed?in both cases? i need a little bit detail ans?thnks

2 Answers  


can inline function declare in private part of class?

1 Answers  


What is command routing in MFC

1 Answers   GE,


What does no cap mean?

0 Answers  


Categories