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
What are the two main components of c++?
Will a recursive function without an end condition every quit, in practice a) Compiler-Specific (Some can convert to an infinite loop) b) No c) Yes
What is the maximum combined length of command line arguments including the space between adjacent arguments?
What is name hiding in c++?
How to get the current position of the file pointer?
what are the types of Member Functions?
Should you pass exceptions by value or by reference?
What is the difference between a definition and a declaration?
Explain this pointer?
What do you mean by const correctness?
What is virtual base class uses?
What size is allocated to the union variable?
What is the use of "new" operator?
List the types of polymorphism in c++?
Can comments be nested?