The common folklore says that:
The type system exists for a reason. Integers and pointers are distinct types, casting between them is a malpractice in the m
You may need to access memory at a fixed known address, then your address is an integer and you need to assign it to a pointer. This is somewhat common in embedded systems. Conversely, you may need to print a memory address and thus need to cast it to integer.
Oh, and don't forget you need to assign and compare pointers to NULL, which is usually a pointer cast of 0L