Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

What does RAII stand for and what does it guarantee?

  1. A Resource Acquisition Is Initialisation; resources are released when the owning object goes out of scope
  2. B Random Access Is Immediate; constant time lookup
  3. C Reference And Instance Isolation; objects are copied on assignment
  4. D Runtime Allocation In Increments; memory grows dynamically
Answer

Resource Acquisition Is Initialisation; resources are released when the owning object goes out of scope

Because destructors run during stack unwinding, cleanup happens even when an exception propagates, which is why RAII is central to exception safety.

All C++ MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as