Constructors Questions and Answers
Practice ModeShowing 10 of 15 questions
Q11
Which of the following statements are correct about the C#.NET code snippet given below?
class Sample
{
static int i;
int j;
public void proc1()
{
i = 11;
j = 22;
}
public static void proc2()
{
i = 1;
j = 2;
}
static Sample()
{
i = 0;
j = 0;
}
}
Answer: Option B
Q12
Which of the following statements is correct?
Answer: Option B
Q13
Is it possible for you to prevent an object from being created by using zero argument constructor?
Answer: Option A
Q14
Which of the following statements are correct about static functions?
Answer: Option D
Q15
Which of the following statements is correct about constructors in C#.NET?
Answer: Option C