What will happen if I allocate memory using "new" and free
it using "free" or allocate sing "calloc" and free it using
"delete"?

Answer Posted / ekta

free is not compatible with new.
free wont recognise the memory allocated by new and should
gie some error i guess.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is buffering in c++?

591


How can I learn dev c++ programming?

575


How does code-bloating occur in c++?

762


how to connect with oracle 9i with server in socket program in c/c++

1857


Is atoi safe?

611






Can member functions be private?

604


Are php strings immutable?

576


Differentiate between a copy constructor and an overloaded assignment operator.

649


When does the c++ compiler create temporary variables?

584


Explain how overloading takes place in c++?

581


What is the difference between reference and pointer?

620


What are the operators in c++?

607


Assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the most efficient pseudocode algorithm you can to find the record with a specific studentID if every single student ID from 101 to 500 is used and the array has 400 elements. Write the most efficient pseudocode algorithm you can to find a record with a studentID near the end of the IDs, say in the range from 450 to 500, if not every single student ID in the range of 101 to 500 is used and the array size is only 300

1801


what Is DCS ? what i will get benefit when i did?

1844


How to allocate memory dynamically for a reference?

554