Amazon interview question

What is wrong with this code: int *ptr; *ptr = 7;

Interview Answer

Anonymous

Oct 21, 2011

The pointer is not initialised and the program will crash.

2