The best recommendation I can give you is to watch these video lessons. And I do not even say these. Almost all of them are very weak, superficial and most of the time incorrect or at least misleading.
The first code only compiles with options to let possible problems pass. This is an alert. So far so good.
The second code does not run because you're picking up dirt. The last thing you should do is take an arbitrary value, play on a variable and try to access it as if it were a valid memory address. It's a lottery. Programming should not be lottery. This should only be taught to say not to do.
His code worked under the conditions he was using. It will not work under any other condition. The video should warn this, and if it did not, it shows how bad it is. I have tried and each implementation gives a different address. You can not trust this. Forget this madness. The only way to use a fixed address is something that is documented that will always be there, which is rare nowadays.
Aliases, the code style displayed is also bad. I would not worry too much if I was teaching who has a good notion of programming and how languages work. But I realize that the goal is to teach lay people. There he creates bad addictions, since lay people often use these "lessons" as a cake recipe.
Try to learn from better sources, which really teach programming, how language really works. If you have specific questions, post here. Even when someone says something silly, someone else appears to show that it is wrong, so you do not run a lot of risk of learning wrong (this is better, today some things are wrong).