What is the difference between new/delete and malloc/free?



What is the difference between new/delete and malloc/free?..

Answer / neelam saini

Malloc/free do not know about constructors and destructors. New and delete create and destroy objects, while malloc and free allocate and deallocate memory.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is a v-table?

0 Answers  


Can I create my own functions in c++?

0 Answers  


Write a program to get the value of sin (x) using a library function , when x is given in degrees.

1 Answers  


What is const pointer and const reference?

0 Answers  


Define basic type of variable used for a different condition in C++?

0 Answers  






declare an array of structure where the members of the structure are integer variable float variable integer array char variable access all elements of the structure using dot operator and this pointer operator

0 Answers  


Evaulate: 22%5 a) 2 b) 4 c) 0

0 Answers  


Write a C++ program to sort digits of all the 4 digit number and display the sorted 4 digit number

1 Answers   TATA, TCS,


in C++ , the word plus plus who found this?

4 Answers  


What is c++ best used for?

0 Answers  


Can you think of a situation where your program would crash without reaching the breakball, which you set at the beginning of main()?

1 Answers  


Should the member functions which are made public in the base class be hidden?

0 Answers  


Categories