<< This is undefined behaviour. Since you haven't initialised variable p, the compiler is free to implement whatever it likes here. In particular, >> Presumably with warnings switched on, you would have got the appropriate warning which would have saved you submitting the bogus example :-)