What are smart pointers?

Answer Posted / hr@tgksolutions.com

• Smart pointers like std::unique_ptr, std::shared_ptr, and std::weak_ptr manage dynamic memory automatically, preventing memory leaks.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is #include iostream h in c++?

875


Explain explicit container.

872


What is a rooted hierarchy?

903


What is the difference between the compiler and the preprocessor?

881


True or false, if you keep incrementing a variable, it will become negative a) True b) False c) It depends

2127


How can we check whether the contents of two structure variables are same or not?

835


Explain class invariant.

798


If a function doesn’t return a value, how do you declare the function?

842


Why pointer is used in c++?

846


What is the limitation of cin while taking input for character array?

1753


What is the c++ programming language used for?

784


Explain linear search.

851


Explain binary search.

812


What are the c++ access specifiers?

1108


What is operator overloading in c++ example?

891