Examveda

What will be the output of the following C# code snippet?
class A
{
    int i;
    int j;
    public A()
    {
        i = 1;
        j = 2;
    }
}
class Program
{
    static void Main(string[] args)
    {
       A obj1 = new A();
       Console.WriteLine(obj1.ToString());
       Console.ReadLine();
    }
}

A. True

B. False

C. String associated with obj1

D. Compile time error

Answer: Option C


This Question Belongs to C Sharp Programming >> Miscellaneous In C Sharp

Join The Discussion

Related Questions on Miscellaneous in C Sharp