1.

Correct method to define + operator is?(a) public sample operator +(int a, int b)(b) public abstract operator +(int a, int b)(c) public static sample operator+(int a, int b)(d) public abstract sample operator +(int a, int b)This question was addressed to me in an online quiz.Query is from Introduction of Overloaded Operators topic in division Object Oriented Concepts of C#

Answer»

The CORRECT choice is (C) PUBLIC static SAMPLE operator+(int a, int b)

EXPLANATION: None.



Discussion

No Comment Found

Related InterviewSolutions