What are smart pointer? Whats its use?



What are smart pointer? Whats its use?..

Answer / amit wagh

Smart Pointer is basically a class implementation, which
wraps around a pointer and provided functionalities like
ownership of allocated memory proper cleanup.
Smart pointers are used when dealing with memory allocated
on heap.

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More C++ General Interview Questions

How c functions prevents rework and therefore saves the programers time as wel as length of the code ?

0 Answers  


Explain deep copy?

0 Answers  


How is computer programming useful in real life?

0 Answers  


There are 100 students in a class. The management keep information in two tables. Those two tables are given like Roll no Name Age 001 ABC 15 002 XYZ 14 and Roll No Subject Marks 001 Math 75 001 Physics 55 002 Math 68 001 Hindi 69 They want the information like this Roll No Name Hindi Physics Math Total 001 ABC 69 55 75 199 002 XYZ 68 74 84 226 And Roll No Suject Highest 001 Math 98 007 Physics 84 021 Hindi 74 All 275 All information is kept in structure in main memory. You have to find last two tables.

0 Answers  


what is the behaviour of C and C++ compiler for the below statements. int *p; p = malloc(100); Is the behaviour same ? or different ?

2 Answers  






What parameter does the constructor to an ofstream object take?

0 Answers  


What is scope resolution operator in c++ with example?

0 Answers  


Describe linkages and types of linkages?

0 Answers  


Is there a new/delete equivalent of realloc?

1 Answers  


What is c++ similar to?

0 Answers  


How do you flush a buffer in c++?

0 Answers  


What are advantages and disadvantages of Design patterns?

7 Answers   IBM, Vodafone,


Categories