What will be the output of the following C# code snippet? [code] class UnsafeCode { unsafe static void Main() { int*

Kim Thu Đoàn

New member
What will be the output of the following C# code snippet?
Code:
 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
 

Tìm kiếm

Back
Top