Examveda

What will be the output of the following C# code snippet?
class UnsafeCode
{
    unsafe static void Main()
    {
        int* p ;
        int ch = 13*5;
        p = &(ch);
        Console.WriteLine(Convert.ToChar(*p));
        if (*p == 'A')
        Console.WriteLine(Convert.ToBoolean(1));
        else
        Console.WriteLine(Convert.ToBoolean(0));
        Console.ReadLine();
    }
}

A. 65 False

B. 65 1

C. A True

D. A 1

Answer: Option C


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

Join The Discussion

Related Questions on Miscellaneous in C Sharp