problem with displaying pointer address in gcc
I have the following C program from page 31 in the MagPi-Magazine ( https://magpi.raspberrypi.org/books/essentials-c-v1/pdf ): https://code.sololearn.com/cA21a17A0a72/?ref=app If I want to compile it on Ubuntu 20.04 with the command gcc -o pointer pointer.c then I get errors and it refuses to compile. If I do the same on Raspberry Pi, it compiles smoothly without errors. And astonishing is that it also runs in sololearn code playground and shows a reasonable output but this is followed by some warnings. I also discovered with gcc -v that Ubuntu (Ubuntu 9.3.0-17ubuntu1~20.04) on my notebook uses gcc in the version 9.3.0 while Raspbian (Raspbian 8.3.0-6+rpi1) uses the version 8.3.0. My questions are: Is the given example in principle wrong? Do I have to use some extra options, and if that is the case, which should I give in the gcc-command in order to run the code also on Ubuntu?