The first code only compiles with options to pass possible problems. This is a warning. So far so good.
The second code doesn’t work because you’ll be picking up dirt. The last thing you should do is take an arbitrary value, play in a variable and try to access it as if it were a valid memory address. It is lottery. Programming should not be lottery. This should only be taught to say not to do.
His code worked in the conditions he was using. It will not work in any other condition. The video should alert this, and if it didn’t, it shows how bad it is. I tried and every execution gives a different address, there’s no trusting it, forget this nonsense. The only way to use a fixed address is something that’s documented that will always be there, which is rare these days.
By the way, the style of code presented is also bad. I wouldn’t worry too much if I was teaching people who have a good sense of programming and how languages work. But I realize that the goal is to teach laypeople. Then it creates bad addictions, since laypeople usually use these "lessons" as cake recipe.
The best recommendation I can give you is to stop watching these video lessons. And not only these, almost all are very weak, superficial and most of the time incorrect or at least misleading (in English has some better).
Look for better fonts to learn how programming really works. If you have any specific questions, put it here. Even when someone talks nonsense, someone else appears to show that they are wrong, so you do not run a lot of risk of learning wrong (this was better, today some things go wrong).
It’s your decision, I told you the address changes every time.
– Maniero