What is difference between new and malloc?

Answer Posted / devi

In C the malloc is used to allocate the memory space


In C++ the new operator is used to allocate the memory space

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?

1639


What are the advantages of polymorphism?

577


How to improve object oriented design skills?

573


Templates mean

1592


Can you explain polymorphism?

585






What is the advantage of oop over procedural language?

630


Why is object oriented programming so hard?

618


Write a program to reverse a string using recursive function?

1798


What is debug class?what is trace class? What differences are between them? With examples.

1612


What is meant by multiple inheritance?

742


Why do we need polymorphism in c#?

695


Can static class have constructor?

589


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

6155


What is destructor oops?

625


write knight tour problem which is present in datastructure

2170