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 / sanjay makwana, puna

When you allocate a memory using new then constructor will
be called but when use a free that time destructor will not
be called.

Same vice versa for calloc and delete.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is double in c++?

996


How a macro differs from a template?

1103


What is ofstream c++?

1018


We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?

1036


What does count ++ do in c++?

1156


What is the full form nasa?

1031


What are the benefits of pointers?

985


Define stacks. Provide an example where they are useful.

951


Which software is best for c++ programming?

997


What is istream c++?

1121


Write a program to find the Fibonacci series recursively.

1025


What is near, far and huge pointers? How many bytes are occupied by them?

1069


Which compiler does turbo c++ use?

1023


Write about the members that a derived class can add?

934


Out of fgets() and gets() which function is safe to use?

1070