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 the program for maximum of the following numbers? 122,198,290,71,143,325,98

5 Answers  


What is pointer and structure in c?

0 Answers  


Program to swap the any two elements in an array containing N number of elements?

1 Answers   Bosch, Glenwood, Ugam Solutions,


Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)

0 Answers  


Can you write a programmer for FACTORIAL using recursion?

0 Answers   ADP,


write a programming in c language, 1 3 5 7 9 11

2 Answers   NIIT,


main() { int x=2, y=4 if ((x==2||y==4) x++ y++ if (y==4+1) { x=x+y; } y++; printf("The values of x and y are %d and %d."x,y); } What is the output?

5 Answers   TCS,


write a program to arrange the contents of a 1D array in ascending order

4 Answers  


what is the difference between these initializations? Char a[]=”string”; Char *p=”literal”; Does *p++ increment p, or what it points to?

4 Answers  


What are terms in math?

0 Answers  


What is encapsulation?

2 Answers  


HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????

0 Answers  


Categories