Scope has no meaning for object lifetime. It doesn't exist at
runtime.
Yes and no. The concepts are definitely orthogonal, but for
historical reasons, in C++, object lifetime, or at least the
default object lifetime, is partially determined by the scope of
the object's definition.
But, with the exception of the dynamic allocation where you
specifically have control over when you destroy it, objects
are always destructed in reverse order of construction.
Only within very restricted categories, and with numerous
exceptions. Reverse order is true for members of a class,
temporaries whose lifetime hasn't been extended, non-static
local variables, objects with static lifetime, and I think (but
I'm not sure) thrown objects. It's trivial, however, to create
examples where order of destruction is not the reverse of
construction: anytime a temporary is bound to a const reference,
for example, or is used to initialize an other object; or between
static and non-static local variables. E.g.:
void
f()
{
MyClass a ;
static MyClass b ;
}
Order of construction: a, then b. Order of destruction, a, and
sometime well after leaving f, b. (Throw in a call to exit() at
the end of f, and the issue becomes even less clear---a will
never be destructed.)