What is a memory leak? How to avoid it?



What is a memory leak? How to avoid it?..

Answer / hrpynux@gmail.com

Memory leak occurs when programmers create a memory in heap and forget to delete it. ... To avoid memory leaks, memory allocated on heap should always be freed when no longer needed.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

Who invented b language?

0 Answers  


what is bit rate & baud rate? plz give wave forms

0 Answers  


Why c is called object oriented language?

0 Answers  


difference between c and c++?

2 Answers  


When should the volatile modifier be used?

0 Answers  






How to find the usage of memory in a c program

1 Answers   Infosys,


Explain built-in function?

0 Answers  


main() { enum _tag{ left=10, right, front=100, back}; printf("%d, %d, %d, %d", left, right, front, back); }

1 Answers   Accenture, Vector,


why Language C is plateform dependent

3 Answers   Siemens, Wipro,


What is the use of gets and puts?

0 Answers  


main() { int i,n=010; int sum=0; for(i=1;i<=n;i++) {s=s+i; } printf("%d",&s); getch(); }

6 Answers  


What are the restrictions of a modulus operator?

0 Answers  


Categories