Vidyalelo
C# Programming · Q108

Miscellaneous in C Sharp

Programming · C# Programming · question 108

Q108

What will be the output of the following C# code snippet? class UnsafeCode unsafe static void Main() int* p; p = (int*)(65535); Console.WriteLine((uint)p); Console.ReadLine();

A.
compile time error
B.
garbage value
C.
program prints value at address 65535
D.
program prints 65535
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board