Given that all the primitive data types and objects have memory allocated, it is intuitively easy to imagine the pointers to these types.
But where exactly do function p
It's a code pointer. It points to the function's address. It is essentially as you described. And yes, if you have pointers that don't point to what you expect, you will have problems.