what is smart pointer & use of the smart pointer ???
Answer Posted / satya
Smart pointers are objects which store pointers to
dynamically allocated (heap) objects. They behave much like
built-in C++ pointers except that they automatically delete
the object pointed to at the appropriate time. Smart
pointers are particularly useful in the face of exceptions
as they ensure proper destruction of dynamically allocated
objects. They can also be used to keep track of dynamically
allocated objects shared by multiple owners.
| Is This Answer Correct ? | 16 Yes | 0 No |
Post New Answer View All Answers
What are static variables?
Describe new operator and delete operator?
Explain how the virtual base class is different from the conventional base classes of the opps.
In a function declaration what does extern means?
What is the protected keyword used for?
what are the characteristics of Class Members in C++?
What is the use of :: operator in c++?
What do you mean by funtion prototype?
Describe Trees using C++ with an example.
What are the extraction and insertion operators in c++?
What is difference between malloc()/free() and new/delete?
What is class definition in c++ ?
What are built-in functions? What is the syntax for the definition?
write asingle linked list which read from two list & the do the following 1 sort the prime & nonprime num (prime should be less tn nonprime) 2 each node has a prime num followd by nonprime 3 add a new node into its sutable plce 4 erase the most three duplicated non prime num 5 find the least duplicated prime num
an operation between an integer and real always yeilds a) integer result b) real result c) float result