Which of the following statement is not True?

  1. A data member of a class can be declared as static and is normally used to maintain values common to the entire class.
  2. A friend function can be invoked like a normal function without the help of any object.
  3. The scope resolution operator (::) can be overloaded like normal operators
  4. Multiple inheritance may lead to duplication of inherited members from a "Grandparent" base class. This may be avoided by making the common base class a virtual base class.

Answer (Detailed Solution Below)

Option 3 : The scope resolution operator (::) can be overloaded like normal operators

Detailed Solution

Download Solution PDF

The correct answer is Option 3.

Key Points

  • A data member of a class can be declared as static and is normally used to maintain values common to the entire class.
  • A friend function can be invoked like a normal function without the help of any object.
  • The scope resolution operator (::) cannot be overloaded like normal operators.
  • Multiple inheritance may lead to duplication of inherited members from a "Grandparent" base class. This may be avoided by making the common base class a virtual base class.

Additional Information

  • The scope resolution operator (::) is used to define the scope of a function or a variable in C++.
  • While most operators can be overloaded in C++, the scope resolution operator (::) is one of the few exceptions that cannot be overloaded.
  • This restriction helps in maintaining the clarity and unambiguous usage of the scope resolution operator.
Get Free Access Now
Hot Links: teen patti jodi teen patti cash teen patti master real cash teen patti royal - 3 patti teen patti bindaas