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

given a set based questions and 5 questions based on it next data sufficiciency questions 2 and 2/3 english sentence completion with options very easy and 2 synononmys paragraph with 10 questions 10 minutes replace =,-,*,% with -,%,+,* type questions 5 3 questions lik following itssickhere itssickthere itssickhere istsickhere which is nt alike the others very easy

0 Answers   DELL,


what is difference b/w object based and object oriented programming language?

18 Answers   Chaitanya, College School Exams Tests, Educomp, IBM, Infosys, Telko,


Please send ford technologies placement paper 2 my mail id

0 Answers  


diff between Virtual mathod and abstract method?

1 Answers  


to remove the repeated numbers from the given . i.e.., if the input is 12233 output should of 123

2 Answers  






2. Give the different notations for the class.\

0 Answers  


What is the difference between encapsulation and polymorphism?

0 Answers  


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.

1 Answers  


What is polymorphism in oop example?

0 Answers  


monkey starts climbing up a tree 20ft tall,each hour ,it hops 3ft and slips back by 2ft .how much time it wil tak to reach top of the tree?

13 Answers   IonIdea,


what are the different types of qualifier in java?

0 Answers   TCS,


Will I be able to get a picture in D drive to the c++ program? If so, help me out?

0 Answers  


Categories