Question 26: What will be the output of the following program?
public class Program
{
public static void Main(string[] args)
{
for(int i=0;i<4;i++)
Printer.Print(i);
}
}
public class Printer
{
public static void Print(object o)
{
Console.Write(o);
}
}
Question 27: What will be the output of the following program?
object o = "Hello"
string s1 = o;
Console.Write(s1);
Question 28: What will be the output of the following program?
static void Main()
{
object obj = "Hello";
Console.Write(obj is string);
}
Question 29: String is _______ .
Question 30: What will be the output of the following program?
public static void Main()
{
StringBuilder sb = new StringBuilder();
sb = "Hello";
Console.WriteLine(sb);
}