What will be the output of the following C# code segment?
Posted: Wed Jul 13, 2022 7:57 pm
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
a) The program will print 10
b) Run time error
c) Compile time error
d) Output is the address contained in p