Operator Overloading Interview Questions in C# - 1
Question: 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.
Question: 2
Define Interface?
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.
Question: 3
List any four over loadable operators?
Binary Arithmetic à +, -, *, /, %
Binary Bitwise à &, |, ^, <<, >>
Unary Arithmetic à +, -, ++, --
Unary Bitwise à true, false, !, ~
Logical operators à ==, !=, >=, <=,>
Question: 4
What are the operators that are not overloaded?
Assignment à +=, -=,*=, %=, /=
Conditional à &&, ||
Other à(), =, ?, ?:, ->,new, size of, is, as, type of.
Electromagnetic Induction Questions & Answers Pdf More
A.C. Basics and Networks Quiz Questions & Answers Pdf More
Signals and Systems Quiz Questions and Answers Pdf More
Signals and Systems MCQ Questions and Answers Pdf More
Electrical Power Sources Quiz Questions & Answers Pdf More
Top 1000+ Multimedia Online Test More
Asp.net MVC Interview Questions for Experienced More
1000+ Permutation and combination Questions for Competitive Exams More
1000+ Steam and Power Generation MCQ Questions and Answers More
Computer Awareness MCQS PDF for Bank PO, SO, Clerk Exams More