By default a real number is treated as a
Practice Friend Functions –
By default a real number is treated as a
By default a real number is treated as a
Practice Friend Functions –
By default a real number is treated as a
The following can be declared as friend in a class
Practice Friend Functions –
The following can be declared as friend in a class
It is possible to declare as a friend
Practice Friend Functions –
It is possible to declare as a friend
The keyword friend does not appear in
Practice Friend Functions –
The keyword friend does not appear in

Practice Friend Functions –
Predict the output of the followiing program.
#include <iostream>
using namespace std;
class A
{
public:
virtual void fun() { cout << "A::fun() "; }
};
class B: public A
{
public:
void fun() { cout << "B::fun() "; }
};
class C: public B
{
public:
void fun() { cout << "C::fun() "; }
};
int main()
{
B *bp = new C;
bp->fun();
return 0;
}

Practice Friend Functions –
Find the output of following program?
#include<iostream>
using namespace std;
class Base
{
public:
virtual void show() = 0;
};
int main(void)
{
Base b;
Base *bp;
return 0;
}