Operator function is created using operator keyword - Operator Overloading

Q.  An operator function is created using _____________ keyword.
- Published on 17 Jul 15

a. iterator
b. allocator
c. constructor
d. operator

ANSWER: operator
 

    Discussion

  • Brijesh   -Posted on 24 Oct 15
    An operator function is created using operator keyword.
    General form of a member operator function is as follows.
    ret-type class-name::operator operatorSign (arg-list)
    {
    // operations
    }

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)