Shall we use 'free' to free memory assigned by new, What are
the further consequences??

Answer Posted / uma sankar pradhan

No,we shouldnot use 'free' to free memory assigned by new.
It causes memory leak and sometimes hanging of the system

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In a function declaration what does extern means?

589


Is there any function that can skip certain number of characters present in the input stream?

578


Difference between delete and free.

608


What is the function to call to turn an ascii string into a long?

590


When is the destructor called?

599






Can we define function inside main in c++?

545


What is auto type c++?

620


How a pointer differs from a reference?

684


What is an adaptor class in c++?

596


What is ostream in c++?

565


How can you link a c program with a c function?

556


What is runtime errors c++?

564


Write about c++ storage classes?

740


Which software is used for c++ programming?

610


What is command line arguments in C++? What are its uses? Where we have to use this?

571