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 / roshan p.r.
Hi,
you cannot free a memory allocated with new using "free"
and in the same way callac with "delete"
because they are incompatable
| Is This Answer Correct ? | 0 Yes | 6 No |
Post New Answer View All Answers
how to access grid view row?
Can a program run without main?
What are the rules about using an underscore in a c++ identifier?
What are files in c++?
How do you traverse a btree in backward in-order?
What is the use of class in c++?
Describe protected access specifiers?
What is the role of static keyword for a class member variable?
What is the basic structure of a c++ program?
Write my own zero-argument manipulator that should work same as hex?
How would you implement a substr() function that extracts a sub string from a given string?
Out of fgets() and gets() which function is safe to use?
give me an example for testing a program showing the test path .show how the test is important and complex.
If you want to share several functions or variables in several files maitaining the consistency how would you share it?
What is a v-table?