simulator crashes with segmentation fault

I'm trying to run a simple "Hello World" program on the simulator but it keeps crashing with a Segmentation fault.

Why is this happening?