OOPs Interview Question and Answers

21. Classify the operator based on the number of operands.
 
  • Unary
  • Binary
  • Ternary
 
Your Name Your Email-ID
Your Answer
22. List the categories of the assignment operator?
 
    It is used to assign the values of an expression to a variable. In C#, there are three categories of assignment operations.
  • Simple assignment.
  • Compound assignment.
  • Multiple assignment.
 
Your Name Your Email-ID
Your Answer
23. What is called compound statement?
 
  • A group of statements enclosed within the curly braces comprises a block.
  • It is also known as compound statement.
 
Your Name Your Email-ID
Your Answer
24. What is the use of ref keyword?
 
  • The C# allows a called method to modify the value of a passed argument if it is necessary.
  • If we want the called method to modify the value of a supplied argument and return the modified value, we should pass the argument using its reference.
 
Your Name Your Email-ID
Your Answer
25. Define boxing?
  A technique which converts the value type on the stack to a object type on the heap is called Boxing.
 
Your Name Your Email-ID
Your Answer
123456789101112 Page 5 of 12