Pergunta de entrevista da empresa Amadeus

obj * arr = new obj[10]; delete arr;

Respostas da entrevista

Sigiloso

10 de mar. de 2015

This ends up with segmentation fault on linux + gcc, which wasnt in the given choices.

1

Sigiloso

30 de ago. de 2016

And if it doesn't, it only calls the destructor of the first object in the array. In any case, it is UB (undefined behavior), so it can do anything the compiler decides to.