Writing a pointer value is pointless; it's just a random address. You initialize the pointer with the address of the variable on the stack, such an address does not repeat well. You want to dereference a pointer using the * operator. Like this:
Console.WriteLine(*j);
Which writes the specified value, 5 in your case.
source
share