Are you preparing for the next job interviews in C# .NET? If yes, trust me this post will help you also we'll suggest you check out a big collection for Programming Full Forms that may help you in your interview:
List of Programming Full Forms
The questions are as follows along with the options given below them:
1. CLR is the .Net equivalent of _____.
- Java Virtual machine
- Common Language Runtime
- Common Type System
- Common Language Specification
Ans: A
2. Abstract class contains _____.
- Abstract methods
- Non Abstract methods
- Both
- None
Ans: C
3. The default scope for the members of an interface is _____.
- private
- public
- protected
- internal
Ans: B
4. Which of the following statements is incorrect about delegate?
- Delegates are reference types.
- Delegates are object-oriented.
- Delegates are type-safe.
- Only one can be called using a delegate.
Ans : D
5. The space required for structure variables is allocated on the stack.
- True
- False
- Maybe
- Can’t say
Ans: A
6. Which of the following is incorrect about constructors?
- Defining of constructors can be implicit or explicit.
- The calling of constructors is explicit.
- Implicit constructors can be parameterized or parameterless.
- Explicit constructors can be parameterized or parameterless.
Ans: C
7. Reference is a ___.
- Copy of class which leads to memory allocation.
- Copy of class that is not initialized.
- Pre-defined data type.
- Copy of class creating by an existing instance.
Ans: D
8. The data members of a class by default are?
- protected, public
- private, public
- private
- public
Ans: C
9. What is the value returned by function compareTo( ) if the invoking string is less than the string compared?
- Zero
- A value of less than zero
- A value greater than zero
- None of the mentioned
Ans: B
10. The correct way to overload +operator?
- public sample operator + (sample a, sample b)
- public abstract operator + (sample a, sample b)
- public static operator + (sample a, sample b)
- all of the mentioned above
Ans: D
11. Select the two types of threads mentioned in the concept of multithreading?
- Foreground
- Background
- Only foreground
- Both foreground and background
Ans: D
12. Choose the wrong statement about properties used in C#.Net?
- Each property consists of accessor as getting and set.
- A property cannot be either read or write-only.
- Properties can be used to store and retrieve values to and from the data members of a class.
- Properties are like actual methods that work like data members.
Ans: A
13. If a class ‘demo’ had ‘add’ property with getting and set accessors, then which of the following statements will work correctly?
- math.add = 20;
- math m = new math();
m.add = 10; - Console.WriteLine(math.add);
- None of the mentioned
Ans: A
14. What will be the output of the following code snippet?
using System;
class sample
{
int i;
double k;
public sample (int ii, double kk)
{
i = ii;
k = kk;
double j = (i) + (k);
Console.WriteLine(j);
}
~sample()
{
double j = i - k;
Console.WriteLine(j);
}
}
class Program
{
static void Main(string[] args)
{
sample s = new sample(9, 2.5);
}
}
- 0 0
- 11.5 0
- Compile-time error
- 11.5 6.5
Ans : D
15. What will be the output of the following code snippet?
using System;
class program
{
static void Main(string[] args)
{
int x = 8;
int b = 16;
int c = 64;
x /= c /= b;
Console.WriteLine(x + " " + b+ " " +c);
Console.ReadLine();
}
}
- 2 16 4
- 4 8 16
- 2 4 8
- 8 16 64
Ans: A
16. Struct’s data members are ___ by default.
- Protected
- Public
- Private
- Default
Ans: C
17. The point at which an exception is thrown is called the _____.
- Default point
- Invoking point
- Calling point
- Throw point
Ans: D
18. Which of the following statements are correct for C# language?
- Every derived class does not define its own version of the virtual method.
- By default, the access mode for all methods in C# is virtual.
- If a derived class, does not define its own version of the virtual method, then the one present in the base class gets used.
- All of the above.
Ans: C
19. What will be the output of the following code snippet?
using System;
class sample
{
public sample()
{
Console.WriteLine("constructor 1 called");
}
public sample(int x)
{
int p = 2;
int u;
u = p + x;
Console.WriteLine("constructor 2 called");
}
}
class Program
{
static void Main(string[] args)
{
sample s = new sample(4);
sample t = new sample();
Console.ReadLine();
}
}
- constructor 1 called
constructor 2 called - constructor 2 called
constructor 1 called - constructor 2 called
constructor 2 called - error
Ans: B
20. Which of the following keywords is used to refer base class constructor to subclass constructor?
- this
- static
- base
- extend
Ans: C
More Interview Questions and Answers:
- Top 15 Python Interview Questions
- React Interview Question
- C# Interview Questions and Answers
- Top 10 IoT Interview Questions
- DotNet Core Interview Questions and Answers
- Angular Interview Questions with Answers
- Interview questions for Asp.Net and .Net
- OOPs Interview Questions and Answers
- Blazor Interview Questions and Answer
- Top 10 Interview Questions and Answered for Web Developer of 2020
- OOPs Interview Questions and Answers in C#
- GoogleCloud Interview Questions
- Asp.net MVC Interview Questions and Answers
- Interview Questions and Answers On Selenium Webdriver


