Question 21: What will be the output of the following program?
public static void Main(string[] args)
{
object o = "Bill";
Console.WriteLine(o.GetType());
}
Question 22: What will be the output of the following program?
public static void Main(string[] args)
{
object o = "Bill";
Change(o);
}
static void Change(object obj)
{
Console.Write("object");
}
static void Change(string str)
{
Console.Write("string");
}
Question 23: What will be the output of the following program?
public static void Main(string[] args)
{
int i=10;
float f = 34.412F;
display(i);
display(f);
}
static void display(float f){
Console.Write(f + " ");
}
Question 24: What will be the output of the following program?
public static void Main(string[] args)
{
int i=10;
float f = 34.412F;
display(i);
display(f);
}
static void display(int i){
Console.Write(i + " ");
}
Question 25: Which of the following convert a string to an int?