I saw this piece of C# code in one of the msdn articles:
using System; class Test
{
public static unsafe void Main()
{
int* fib = stackalloc int[100];
int* p = fib;
*p++ = *p++ = 1;
for (int i=2; i<100; ++i, ++p)
*p = p[-1] + p[-2];
for (int i=0; i<10; ++i)
Console.WriteLine (fib[i]);
}
}
I am fairly new to pointers. I understand most of this code, but it would be great if someone can help me understand this line in the above code in more detail:
*p++ = *p++ = 1
Got my answer guys.. thanks a lot for the quick responses!