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...


When you call malloc() to allocate memory for a local
pointer, do you have to explicitly free() it?

Answers were Sorted based on User's Feedback



When you call malloc() to allocate memory for a local pointer, do you have to explicitly free() it?..

Answer / shruti

yup.. we have to explicitly free it..
otherwise it results in "dangling pointer"..

Is This Answer Correct ?    20 Yes 0 No

When you call malloc() to allocate memory for a local pointer, do you have to explicitly free() it?..

Answer / guest

Yes you have to.

Is This Answer Correct ?    13 Yes 1 No

Post New Answer

More C Interview Questions

write a program to copy the string using switch case?

0 Answers   Mind Tree,


What is the purpose of sprintf?

0 Answers  


write a program in 'c' to find the value of p[i+1]^n.p,i,n are arguments of a macro and n is a integer

1 Answers  


#define f(x) main() { printf("\n%d",f(2+2)); }

5 Answers  


Explain what is the stack?

0 Answers  


what is the function of pragma directive in c?

0 Answers  


Why #include is used in c language?

0 Answers  


How will you find a duplicate number in a array without negating the nos ?

0 Answers  


Why is struct padding needed?

0 Answers  


What is the use of keyword VOLATILE in C?

1 Answers  


How can I find out the size of a file, prior to reading it in?

0 Answers  


What are the different types of pointers used in c language?

0 Answers  


Categories