ExamVeda
Login
Home
Miscellaneous in C Sharp
?

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();
    }
}

Answer & Solution
Correct Answer: Option C
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.