When you call malloc() to allocate memory for a local
pointer, do you have to explicitly free() it?
Answer Posted / shruti
yup.. we have to explicitly free it..
otherwise it results in "dangling pointer"..
| Is This Answer Correct ? | 20 Yes | 0 No |
Post New Answer View All Answers
This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory
What is the difference between arrays and pointers?
what is use of malloc and calloc?
Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
What is a list in c?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
What is the size of empty structure in c?
What is the difference between typedef and #define?
hi any body pls give me company name interview conduct "c" language only
What is the main difference between calloc () and malloc ()?
Is there a way to switch on strings?
Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.
Can I initialize unions?
why wipro wase
Differentiate between static and dynamic modeling.