Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the difference between prefix and postfix versions of operator++()?

1069


What is constructor c++?

1106


What is singleton pattern in c++?

976


What does namespace mean in c++?

1066


Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).

1100


Is rust better than c++?

1104


How do you clear a map in c++?

1116


If a base class declares a function to be virtual, and a derived class does not use the term virtual when overriding that class, is it still virtual when inherited by a third-generation class?

1019


What would happen on forgetting [], while deallocating an array through new?

1072


Why isn't sizeof for a struct equal to the sum of sizeof of each member?

980


What is the difference between method overloading and method overriding in c++?

1137


What is the size of a vector?

1123


What does catch(…) mean?

1102


What is a type library?

1100


Explain linked list using c++ with an example?

1073