C# Variable MCQs

Question 1: Which of the following methods is an entry point in the C# console program?

Question 2: Which of the following keyword is used to include a different namespace in a program?

Question 3: What will be the output of the following program?

public static void Main()
{ 
    int a; 
    Console.WriteLine(a); 
}

Question 4: What will be the output of the following code?

int i = 10, j;
Console.WriteLine(j=i*2); 

Question 5: What will be the output of the following program?

int i;
int j = i;
Console.WriteLine(j); 

Question 6: What will be the output of the following program?

public class Program
{
	public static void Main()
	{
		Employee emp = new Employee();
		Console.WriteLine(emp.salary); 
	}
}

public class Employee
{
	public int salary;
}

Question 7: What will be the output of the following program?

public class Program
{
	public static void Main()
	{
		int[] arr = new int[5];
		Console.WriteLine(arr[0]); 
	}
}

Question 8: What will be the output of the following program?

public static void Main()
{
	int k;
	display(k);
}
	
static void display(int val)
{
	Console.Write(val);
}

Question 9: Which of the following keyword is used to declare a variable whose type will be automatically determined by the compiler?

Question 10: Which of the following type escapes type checking at compile-time; instead, it resolves type at run time?