p = (int*)0x0004;
ought to do it. The cast is not absolutely necessary, but probably will avoid warnings in some cases. I'm not sure what you'd do to get the non-Lvalue assignment thing.
It is possibly important that the address is not a *physical* address, and in particular won't correspond to any hardware device. You're really just asking for a seg fault : )