Dereferencing an invalid pointer can produce unpredictable results.
It may cause the program to terminate.
On Unix you may get a core (memory) dump.
On operating systems which do not provide memory protection (e.g. Window 3.1), you may have to reboot.
You may getting more subtle and confusing problems.