You have one base class virtual function how will call that
function from derived class?
Answers were Sorted based on User's Feedback
Answer / kalaivani
u can call the base class virtual fn,if it is declare as
public
| Is This Answer Correct ? | 4 Yes | 0 No |
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 |
Answer / mazher
class B:A
{
public override void A_Func()
{
base.A_Func();
}
}
| Is This Answer Correct ? | 1 Yes | 2 No |
what is the difference between class to class type conversion and copy constructor ?
what is the use of mutable key word
What is static modifier?
What is multidimensional array?
Write 7 differences between "Public" function and "Private" function?
what is difference between thread and programme.
when my application exe is running nad i don't want to create another exe what should i do
What is Iteration Hierarchy? What is what is Object behavioral concept?
Base class has two public data members. How can i derive a new class with one datamember as public and another data member as private?.
What is coupling in oop?
what is oops
#include <iostream> using namespace std; int main() { int a = 2; int c[5][5]; for (int x=0;x<5;x++) { for (int y=0;y<5;y++) { c[x][y] = x*y; } } cout << c[a][c[1][4]]; }