Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardC++sequencing and evaluation orderSingle-choice MCQ

In `delete[] p` where `p` points to an array of objects with non-trivial destructors, what does the standard guarantee about the order in which the element destructors run, and how does this relate to construction order?

struct T { ~T(); }; T* p = new T[3]; // ... delete[] p;