Question
*/

void main()
{
fig2d obj1;
// fig3d obj2;

obj1 << cout;
// obj2 << cout;
}
/*

Answers

5 6
Explanation:
In this program, the << operator is overloaded with ostream as argument.
This enables the 'cout' to be present at the right-hand-side. Normally, 'cout'
is implemented as global function, but it doesn't mean that 'cout' is not possible
to be overloaded as member function.
Overloading << as virtual member function becomes handy when the class in which
it is overloaded is inherited, and this becomes available to be overrided. This is as opposed
to global friend functions, where friend's are not inherited.   Your Comment






Search
Can you Answer!!
  • Q What is called chaining?
  • Q What is the fundamental unit of amount of a sub- stance?
  • Q How Suspicion of Phage infection occurs?
  • Q How do you return the a hundred books starting from 25th?
  • Q What is the transaction for LIS?
  • Q What does letter A dnote in NPA?
  • Q What is EJB module
  • Q Name five modules that are included in python by default (many people come searching for this, so I included some more examples of modules which are often used)
  • Q What is Bio-village?
  • Q What is the % operator?
  • Q In the western musical terminology, what is meant by "Fortissimo'?