21 real Modern C# 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 Record?
Mid
A.a nondestructive mutation syntax that produces a copy of an object with specified members changed and all others preserved
B.an opt-in compiler feature that distinguishes references that may be absent from those that should not, emitting warnings on potential null dereference without changing runtime behavior
C.a reference or value type, introduced for data-centric design, that the compiler gives value-based equality, a concise positional declaration, and nondestructive copy via a with-expression
D.a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation
2. Which term means: "a reference or value type, introduced for data-centric design, that the compiler gives value-based equality, a concise positional declaration, and nondestructive copy via a with-expression"?
A.Record — a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation
B.Record — a nondestructive mutation syntax that produces a copy of an object with specified members changed and all others preserved
C.Record — a reference or value type, introduced for data-centric design, that the compiler gives value-based equality, a concise positional declaration, and nondestructive copy via a with-expression
D.Record — a feature letting a program's entry-point code be written directly in a file without an explicit class and Main method wrapper
A.language support, used in switch and is expressions, for testing an object's shape, type, or property values and optionally binding parts of it to variables
B.a feature letting a program's entry-point code be written directly in a file without an explicit class and Main method wrapper
C.a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation
D.a nondestructive mutation syntax that produces a copy of an object with specified members changed and all others preserved
5. Which term means: "language support, used in switch and is expressions, for testing an object's shape, type, or property values and optionally binding parts of it to variables"?
A.Pattern matching — a parameter list placed directly on a type declaration whose parameters are in scope throughout the body, available for initializing members
B.Pattern matching — a reference or value type, introduced for data-centric design, that the compiler gives value-based equality, a concise positional declaration, and nondestructive copy via a with-expression
C.Pattern matching — an opt-in compiler feature that distinguishes references that may be absent from those that should not, emitting warnings on potential null dereference without changing runtime behavior
D.Pattern matching — language support, used in switch and is expressions, for testing an object's shape, type, or property values and optionally binding parts of it to variables
A.language support, used in switch and is expressions, for testing an object's shape, type, or property values and optionally binding parts of it to variables
B.a feature letting a program's entry-point code be written directly in a file without an explicit class and Main method wrapper
C.a nondestructive mutation syntax that produces a copy of an object with specified members changed and all others preserved
D.an opt-in compiler feature that distinguishes references that may be absent from those that should not, emitting warnings on potential null dereference without changing runtime behavior
8. Which term means: "an opt-in compiler feature that distinguishes references that may be absent from those that should not, emitting warnings on potential null dereference without changing runtime behavior"?
A.Nullable reference types — a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation
B.Nullable reference types — a reference or value type, introduced for data-centric design, that the compiler gives value-based equality, a concise positional declaration, and nondestructive copy via a with-expression
C.Nullable reference types — a nondestructive mutation syntax that produces a copy of an object with specified members changed and all others preserved
D.Nullable reference types — an opt-in compiler feature that distinguishes references that may be absent from those that should not, emitting warnings on potential null dereference without changing runtime behavior
A.a reference or value type, introduced for data-centric design, that the compiler gives value-based equality, a concise positional declaration, and nondestructive copy via a with-expression
B.language support, used in switch and is expressions, for testing an object's shape, type, or property values and optionally binding parts of it to variables
C.a nondestructive mutation syntax that produces a copy of an object with specified members changed and all others preserved
D.a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation
11. Which term means: "a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation"?
A.Init-only setter — a reference or value type, introduced for data-centric design, that the compiler gives value-based equality, a concise positional declaration, and nondestructive copy via a with-expression
B.Init-only setter — a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation
C.Init-only setter — language support, used in switch and is expressions, for testing an object's shape, type, or property values and optionally binding parts of it to variables
D.Init-only setter — a parameter list placed directly on a type declaration whose parameters are in scope throughout the body, available for initializing members
A.an opt-in compiler feature that distinguishes references that may be absent from those that should not, emitting warnings on potential null dereference without changing runtime behavior
B.a feature letting a program's entry-point code be written directly in a file without an explicit class and Main method wrapper
C.language support, used in switch and is expressions, for testing an object's shape, type, or property values and optionally binding parts of it to variables
D.a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation
14. Which term means: "a feature letting a program's entry-point code be written directly in a file without an explicit class and Main method wrapper"?
A.Top-level statements — a feature letting a program's entry-point code be written directly in a file without an explicit class and Main method wrapper
B.Top-level statements — a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation
C.Top-level statements — an opt-in compiler feature that distinguishes references that may be absent from those that should not, emitting warnings on potential null dereference without changing runtime behavior
D.Top-level statements — a reference or value type, introduced for data-centric design, that the compiler gives value-based equality, a concise positional declaration, and nondestructive copy via a with-expression
A.language support, used in switch and is expressions, for testing an object's shape, type, or property values and optionally binding parts of it to variables
B.a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation
C.a feature letting a program's entry-point code be written directly in a file without an explicit class and Main method wrapper
D.a parameter list placed directly on a type declaration whose parameters are in scope throughout the body, available for initializing members
17. Which term means: "a parameter list placed directly on a type declaration whose parameters are in scope throughout the body, available for initializing members"?
A.Primary constructor — a feature letting a program's entry-point code be written directly in a file without an explicit class and Main method wrapper
B.Primary constructor — an opt-in compiler feature that distinguishes references that may be absent from those that should not, emitting warnings on potential null dereference without changing runtime behavior
C.Primary constructor — a parameter list placed directly on a type declaration whose parameters are in scope throughout the body, available for initializing members
D.Primary constructor — a property accessor that permits assignment only during object construction or an initializer, yielding immutability after creation
A.a parameter list placed directly on a type declaration whose parameters are in scope throughout the body, available for initializing members
B.a nondestructive mutation syntax that produces a copy of an object with specified members changed and all others preserved
C.a reference or value type, introduced for data-centric design, that the compiler gives value-based equality, a concise positional declaration, and nondestructive copy via a with-expression
D.an opt-in compiler feature that distinguishes references that may be absent from those that should not, emitting warnings on potential null dereference without changing runtime behavior
A.With-expression — a feature letting a program's entry-point code be written directly in a file without an explicit class and Main method wrapper
B.With-expression — a reference or value type, introduced for data-centric design, that the compiler gives value-based equality, a concise positional declaration, and nondestructive copy via a with-expression
C.With-expression — language support, used in switch and is expressions, for testing an object's shape, type, or property values and optionally binding parts of it to variables
D.With-expression — a nondestructive mutation syntax that produces a copy of an object with specified members changed and all others preserved
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.