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
What is a list in c?
Explain what does the format %10.2 mean when included in a printf statement?
what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above
What does nil mean in c?
What do mean by network ?
How does normalization of huge pointer works?
Is javascript based on c?
.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }
What is the default value of local and global variables in c?
Why isnt any of this standardized in c?
Can you write the function prototype, definition and mention the other requirements.
What is n in c?
What is extern c used for?
What are the advantages and disadvantages of pointers?
What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25