Equality & Strings interview questions

21 real Equality & Strings questions from the C# bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

1. What is Reference equality default?

Mid
  1. A.the property that text instances cannot be changed after creation, so any apparent modification produces a new instance
  2. B.the behavior whereby the == operator on most classes compares whether two operands point to the same instance rather than comparing their contents
  3. C.an argument modifier requiring the called method to assign the variable before returning, used to produce additional results
  4. D.redefining the inherited content-comparison method (and the matching hash method) so instances are considered equal based on their values rather than identity
Reveal the answer + AI explanation — free account

2. Which term means: "the behavior whereby the == operator on most classes compares whether two operands point to the same instance rather than comparing their contents"?

Mid
  1. A.Ref parameter
  2. B.Reference equality default
  3. C.StringBuilder
  4. D.String interning
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Mid
  1. A.Reference equality default — the behavior whereby the == operator on most classes compares whether two operands point to the same instance rather than comparing their contents
  2. B.Reference equality default — an argument modifier requiring the called method to assign the variable before returning, used to produce additional results
  3. C.Reference equality default — a mutable buffer type for efficiently composing text through many append operations without allocating a new instance each time
  4. D.Reference equality default — the property that text instances cannot be changed after creation, so any apparent modification produces a new instance
Reveal the answer + AI explanation — free account

4. What is String immutability?

Mid
  1. A.the property that text instances cannot be changed after creation, so any apparent modification produces a new instance
  2. B.redefining the inherited content-comparison method (and the matching hash method) so instances are considered equal based on their values rather than identity
  3. C.the runtime optimization of storing a single shared copy of identical literal text so equal compile-time literals reference the same instance
  4. D.an argument modifier requiring the called method to assign the variable before returning, used to produce additional results
Reveal the answer + AI explanation — free account

5. Which term means: "the property that text instances cannot be changed after creation, so any apparent modification produces a new instance"?

Mid
  1. A.String immutability
  2. B.Reference equality default
  3. C.Ref parameter
  4. D.StringBuilder
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Mid
  1. A.String immutability — the behavior whereby the == operator on most classes compares whether two operands point to the same instance rather than comparing their contents
  2. B.String immutability — redefining the inherited content-comparison method (and the matching hash method) so instances are considered equal based on their values rather than identity
  3. C.String immutability — an argument modifier passing a variable by reference and requiring it be initialized beforehand, letting the method read and modify the caller's storage
  4. D.String immutability — the property that text instances cannot be changed after creation, so any apparent modification produces a new instance
Reveal the answer + AI explanation — free account

7. What is String interning?

Mid
  1. A.the property that text instances cannot be changed after creation, so any apparent modification produces a new instance
  2. B.redefining the inherited content-comparison method (and the matching hash method) so instances are considered equal based on their values rather than identity
  3. C.a mutable buffer type for efficiently composing text through many append operations without allocating a new instance each time
  4. D.the runtime optimization of storing a single shared copy of identical literal text so equal compile-time literals reference the same instance
Reveal the answer + AI explanation — free account

8. Which term means: "the runtime optimization of storing a single shared copy of identical literal text so equal compile-time literals reference the same instance"?

Mid
  1. A.String immutability
  2. B.Equals override
  3. C.String interning
  4. D.StringBuilder
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Mid
  1. A.String interning — the runtime optimization of storing a single shared copy of identical literal text so equal compile-time literals reference the same instance
  2. B.String interning — the property that text instances cannot be changed after creation, so any apparent modification produces a new instance
  3. C.String interning — a mutable buffer type for efficiently composing text through many append operations without allocating a new instance each time
  4. D.String interning — an argument modifier requiring the called method to assign the variable before returning, used to produce additional results
Reveal the answer + AI explanation — free account

10. What is StringBuilder?

Mid
  1. A.an argument modifier requiring the called method to assign the variable before returning, used to produce additional results
  2. B.a mutable buffer type for efficiently composing text through many append operations without allocating a new instance each time
  3. C.the behavior whereby the == operator on most classes compares whether two operands point to the same instance rather than comparing their contents
  4. D.the runtime optimization of storing a single shared copy of identical literal text so equal compile-time literals reference the same instance
Reveal the answer + AI explanation — free account

11. Which term means: "a mutable buffer type for efficiently composing text through many append operations without allocating a new instance each time"?

Mid
  1. A.String interning
  2. B.StringBuilder
  3. C.Out parameter
  4. D.Reference equality default
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Mid
  1. A.StringBuilder — the property that text instances cannot be changed after creation, so any apparent modification produces a new instance
  2. B.StringBuilder — an argument modifier passing a variable by reference and requiring it be initialized beforehand, letting the method read and modify the caller's storage
  3. C.StringBuilder — the behavior whereby the == operator on most classes compares whether two operands point to the same instance rather than comparing their contents
  4. D.StringBuilder — a mutable buffer type for efficiently composing text through many append operations without allocating a new instance each time
Reveal the answer + AI explanation — free account

13. What is Out parameter?

Senior
  1. A.the runtime optimization of storing a single shared copy of identical literal text so equal compile-time literals reference the same instance
  2. B.an argument modifier requiring the called method to assign the variable before returning, used to produce additional results
  3. C.redefining the inherited content-comparison method (and the matching hash method) so instances are considered equal based on their values rather than identity
  4. D.the behavior whereby the == operator on most classes compares whether two operands point to the same instance rather than comparing their contents
Reveal the answer + AI explanation — free account

14. Which term means: "an argument modifier requiring the called method to assign the variable before returning, used to produce additional results"?

Senior
  1. A.Out parameter
  2. B.Reference equality default
  3. C.StringBuilder
  4. D.Equals override
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Senior
  1. A.Out parameter — an argument modifier requiring the called method to assign the variable before returning, used to produce additional results
  2. B.Out parameter — redefining the inherited content-comparison method (and the matching hash method) so instances are considered equal based on their values rather than identity
  3. C.Out parameter — the runtime optimization of storing a single shared copy of identical literal text so equal compile-time literals reference the same instance
  4. D.Out parameter — an argument modifier passing a variable by reference and requiring it be initialized beforehand, letting the method read and modify the caller's storage
Reveal the answer + AI explanation — free account

16. What is Ref parameter?

Senior
  1. A.the runtime optimization of storing a single shared copy of identical literal text so equal compile-time literals reference the same instance
  2. B.an argument modifier passing a variable by reference and requiring it be initialized beforehand, letting the method read and modify the caller's storage
  3. C.an argument modifier requiring the called method to assign the variable before returning, used to produce additional results
  4. D.a mutable buffer type for efficiently composing text through many append operations without allocating a new instance each time
Reveal the answer + AI explanation — free account

17. Which term means: "an argument modifier passing a variable by reference and requiring it be initialized beforehand, letting the method read and modify the caller's storage"?

Senior
  1. A.String immutability
  2. B.Reference equality default
  3. C.Ref parameter
  4. D.Equals override
Reveal the answer + AI explanation — free account

18. Which statement is correct?

Senior
  1. A.Ref parameter — an argument modifier passing a variable by reference and requiring it be initialized beforehand, letting the method read and modify the caller's storage
  2. B.Ref parameter — an argument modifier requiring the called method to assign the variable before returning, used to produce additional results
  3. C.Ref parameter — the behavior whereby the == operator on most classes compares whether two operands point to the same instance rather than comparing their contents
  4. D.Ref parameter — redefining the inherited content-comparison method (and the matching hash method) so instances are considered equal based on their values rather than identity
Reveal the answer + AI explanation — free account

19. What is Equals override?

Mid
  1. A.the runtime optimization of storing a single shared copy of identical literal text so equal compile-time literals reference the same instance
  2. B.an argument modifier requiring the called method to assign the variable before returning, used to produce additional results
  3. C.a mutable buffer type for efficiently composing text through many append operations without allocating a new instance each time
  4. D.redefining the inherited content-comparison method (and the matching hash method) so instances are considered equal based on their values rather than identity
Reveal the answer + AI explanation — free account

20. Which term means: "redefining the inherited content-comparison method (and the matching hash method) so instances are considered equal based on their values rather than identity"?

Mid
  1. A.String immutability
  2. B.Reference equality default
  3. C.Equals override
  4. D.Out parameter
Reveal the answer + AI explanation — free account

21. Which statement is correct?

Mid
  1. A.Equals override — an argument modifier requiring the called method to assign the variable before returning, used to produce additional results
  2. B.Equals override — the behavior whereby the == operator on most classes compares whether two operands point to the same instance rather than comparing their contents
  3. C.Equals override — redefining the inherited content-comparison method (and the matching hash method) so instances are considered equal based on their values rather than identity
  4. D.Equals override — a mutable buffer type for efficiently composing text through many append operations without allocating a new instance each time
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Equality & Strings free