int main()
{
int *p = (int*)((int)&p + 0x10);
*p = (int)&trick;
printf("I don't know what will happen...\n");
return 0;
}
This trick takes advantage of the way function calls are implemented by a certain compiler. If you use a compiler that implements them a different way or enable various optimisations with the same compiler, chances are it's not going to work.
Compiling such code might call "trick" successfully on one C implementation, it may give you a fancy error message telling you you're an idiot on another, or something entirely different might happen on some other one. In any case, such code yields undefined behaviour and your C implementation needn't do anything meaningful during its interpretation.
This crappy method of teaching C, perhaps similar to Zed Shaw's "Learn C the Hard Way", is based around "try something and see what happens." This may be a valid way to learn languages that have a single implementation, but you simply can't learn C like this since it's a standardised language with many different implementations.
To cut a long story short, you'd be better off reading a C reference that discusses the language rather than a certain C implementation, like K&R2. N GO REED DA FUCKIN STANDARD SO U DONT BECOME A STUPID STACK BOY.