Question.6
A simple data struct has no destructor defined:
struct Point { int x; int y; }; void func() { Point p = {3, 4}; } // p goes out of scope
Does the compiler generate a destructor for Point?
Point
Select Answer
Yes -- a non-trivial destructor that zeroes the memory
Yes -- but it is a trivial (empty) destructor that does nothing; the compiler may optimize it away entirely
No -- structs do not have destructors
Yes -- it calls free() on the struct members