Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
In the context of the C++ language, there will be undefined behavior with unpredictable consequences. An optimizing compiler can reorder the execution sequence of a program to assume that a dereferenced pointer in a valid program cannot be 0.
In the context of program behavior, if address 0 is accessed, the behavior is OS/runtime dependent. Options -- SIGSEGV signal (POSIX) will be sent to the program, an exception will occur in the program (windows), access will be performed as to any other address (OS without memory protection).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question