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

Giang Phạm

New member
What will be the output of the following C# code segment?
Code:
class UnsafeCode
{
    unsafe static void Main()
    {
         int n = 10;
         void* p = &n;
         Console.WriteLine(*p);
         Console.ReadLine();
     }
 }
A. The program will print 10
B. Run time error
C. Compile time error
D. Output is the address contained in p
 

Tìm kiếm

Back
Top