You are on page 1of 2

1.Define operator overloading ? The mechanism of giving special meaning to an operator is known as operator overloading.

We can overload all the operators except the following.


Class member access operator Scope resolution operator Sizeof operator Conditional operator

2.Give the general form of an operator function ?

Return_type class_name : : operator op ( argument _ list )

function body ;

} 3.Write the steps involved in operator overloading ?


First , create a class that defines the data type that is to be used in the overloading operation Declare the operator function in the public part of a class. It may be either a member function or a friend function. Define the operator function to implement the required operations.