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 is the purpose of std::make_unique?

  1. A It is exception-safe in argument evaluation and avoids writing new explicitly
  2. B It is faster than new
  3. C It allocates on the stack
  4. D It creates a shared pointer
Answer

It is exception-safe in argument evaluation and avoids writing new explicitly

make_shared additionally allocates the object and its control block in a single allocation, which is more efficient than the two-step alternative.

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