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

Tell me can a pure virtual function have an implementation?

1034


Which function cannot be overloaded c++?

1116


What is command line arguments in C++? What are its uses? Where we have to use this?

1278


Write a program to show polymorphism in C++?

1150


What is this pointer in c++?

1406


Write a function to perform the substraction of two numbers. Eg: char N1="123", N2="478", N3=-355(N1-N2).

1001


Distinguish between new and malloc and delete and free().

1022


How is computer programming useful in real life?

1069


Can we use this pointer in a class specific, operator-overloading function for new operator?

1106


What is a multimap c++?

1207


Why do we use classes in programming?

1038


Name four predefined macros.

1040


What is a flag in c++?

1062


What is the use of ::(scope resolution operator)?

1077


If I is an integer variable, which is faster ++i or i++?

1071