Operator Overloading Interview Questions in C# - 1
Why operator overloading?
Operator overloading makes a program clearer than accomplishing the same operations with explicit method calls. Some benefits are
A class that represents an amount of memory.
A word processing or text analysis program that uses classes representing sentences, clauses and so on.
Graphics program that use mathematical or co-ordinate related objects when calculating positions on screen.
Interfaces are syntactically similar to abstract classes.
However, in an interface, no method can include a body.
The interface provides no implementation; it specifies what must be done, but not how.
List any four over loadable operators?
Binary Arithmetic à +, -, *, /, %
Binary Bitwise à &, |, ^, <<, >>
Unary Arithmetic à +, -, ++, --
Unary Bitwise à true, false, !, ~
Logical operators à ==, !=, >=, <=,>
What are the operators that are not overloaded?
Assignment à +=, -=,*=, %=, /=
Conditional à &&, ||
Other à(), =, ?, ?:, ->,new, size of, is, as, type of.
7000+ Question Tags Exercises with Answers Pdf More
7000+ TNPSC Group 4 Study Material Pdf free Download More
7000+ TNPSC Group 4 General English Question Paper with Answers More
7000+ Prepositions Exercises for Class 10 with Answers Pdf More
7000+ Prefix and Suffix MCQs with Answers Pdf More
1000+ Electrical and Electronics Engineering (EEE) Online Test More
Computer Science Questions for Competitive Exams Pdf More
General English Prepositions Questions and Answers More
Verification of Truth of the Statement in Verbal Reasoning Pdf More
Advent of Europeans General Knowledge Questions & Answers More