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 use of mutable key word

3 Answers   HCL,


What is a class?

32 Answers   Infosys, TCS, Thylak,


What is the point of oop?

0 Answers  


What is oop in simple words?

1 Answers  


What is coupling in oops?

0 Answers  


which feature are not hold visual basic of oop?

0 Answers   Ignou,


What does sksksk mean in text slang?

0 Answers  


write a C++ program for booking using constructor and destructor.

0 Answers   HAL,


write string class as your own class in java without using any built-in function

0 Answers  


what is virtual function in c++

6 Answers  


Explain virtual inheritance?

0 Answers  


what is single inheritance?

18 Answers   IBM,


Categories