Question 11: What will be the output of the following program?
public static void Main(string[] args)
{
var x = "5";
Console.Write(x.GetType());
}
Question 12: __________ is the process of converting a�value type�to the reference type.
Question 13: The following is an example of ________.
object val = 123;
int i = (int)val;
Question 14: �Which of the following symbol is used to display a string without using escape characters inside a string?
Question 15: Which of the following data type does not store a sign?
Question 16: What is the size of a decimal?
Question 17: Value types are passed by ______ and reference types are passed by _____.
Question 18: What will be the output of the following program?
public static void Main()
{
string name = "Steve";
Change(name);
Console.WriteLine(name);
}
static void Change(string str)
{
str = "Bill";
}
Question 19: What will the output of the following program?
class Program
{
static void Main(string[] args)
{
int myNum = 10;
ProcessNumber(ref myNum);
Console.WriteLine(myNum);
Console.ReadLine();
}
public static void ProcessNumber(ref int num)
{
num = 100;
}
}
Question 20: What will be the output of the following program?
public class Program
{
public static void Main(string[] args)
{
String str = "Steve";
object o = "Bill";
Change(str);
Console.Write(str + ", ");
Change(o);
Console.Write(o + ", ");
}
static void Change(object obj)
{
obj = obj + " Gates";
}
static void Change(string str)
{
str = str + " Jobs";
}
}