If the behaviour of a C statement is described as undefined, it is impossible to make any assumptions about the result; the compiler is at liberty to do anything ! The ISO C Standard defines 97 instances of undefined behaviour. Most are obvious examples of inconsistency or constructs which clearly have no meaning; but it is important to realise that such constructs can be written without any infringement of the grammatical rules or constraints of the C language and a conforming compiler is not obliged to identify them.
Some examples:
See also:
Implementation Defined Behaviour
Unspecified Behaviour
Index