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

Answer Posted / guest

Yes we can use free which was assigned by new.but in this
case no destrctor will be called as free doesn't call this.
So it is recommended that we should not use free if we
allcoate the memory using new.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What jobs can you get with a c++ certification?

678


What does std :: flush do?

783


Explain the isa and hasa class relationships.

680


What are guid? Why does com need guids?

670


Define the process of handling in case of destructor failure?

670






When do we use copy constructors?

686


What will the line of code below print out and why?

423


What are the advantages of using const reference arguments in a function?

706


What is the best c++ compiler?

680


What is c++ vb?

705


Is C++ case sensitive a) False b) Depends on implementation c) True

695


How can I improve my c++ skills?

662


what is software cycle? What is a mission critical system ? What is the important aspect of a real-time system ? Explain the difference between microkernel and macro kernel. Give an example of microkernel.Why paging is used ? Which is the best page replacement algo and Why ? What is software life cycle ? How much time is spent usually in each phases and why Which one do U want to work if selected in Honeywell ? Which are the different types of testing ? What is a distributed system ? Some questions about CSP. Which languages do U know ? What are the differences between Pascal and C. questions from Compiler construction and Lisp. Which are the different computer architecture? What is the requirement in MIMD ? What is the difference between RISC and CISC processors ? Difference between loosely coupled and tightly coupled systems ? What is an open system?

1862


What are the rules about using an underscore in a c++ identifier?

720


What do you mean by friend class & friend function in c++?

707