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

which is best institute to learn c,c++ in ameerpet hyderabad

1 Answers  


What is inheritance write a program to show use of inheritance?

1 Answers  


to find out the minimum of two integer number of two different classes using friend function

1 Answers  


What is this pointer in oop?

1 Answers  


What is late bound function call and early bound function call? Differentiate.

2 Answers   Ness Technologies,


what is pointers

7 Answers   Exilant,


What is virtual destructor? Why?

3 Answers   Agile Software, College School Exams Tests, CSC,


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  


How would you stop a class from class from being derived or inherited.

18 Answers   Ness Technologies,


what is mean by design pattern

4 Answers  


features of OOPS

22 Answers   Ness Technologies, Satyam,


The IT giant Tirnop has recently crossed a head count of 150000 and earnings of $7 billion. As one of the forerunners in the technology front, Tirnop continues to lead the way in products and services in India. At Tirnop, all programmers are equal in every respect. They receive identical salaries and also write code at the same rate. Suppose 14 such programmers take 14 minutes to write 14 lines of code in total. How long will in take 5 programmers to write 5 lines of code in total ?

6 Answers   TCS,


Categories