Answers were Sorted based on User's Feedback
Answer / roshan.p.r.
Consider the following example..
int *p=new int;
here ten bytes of memory is allocated and the address is
stored in p. the only way to access this memory is via p.
now suppose if u allocate a new memory to p like
the previous address(10 bytes is lost we cant access it
again)because the only way that we had to access it was
pointer p and now a new address(20 bytes) is stored in p.
So we say there is a memory leak.
the best way to handle this is.
int *p=new int;
so in the above case we have first released the memory
pointed by p with delete function and then a new address is
assigned to it.
|Is This Answer Correct ?||1 Yes||0 No|
Answer / sujith
Memory leak is nothing but u create huge chunk of memory
with a malloc or any such mechanism and u never free that
manually which make the available free main memory in the
system to minimum. this may even lead to system crashing.
|Is This Answer Correct ?||1 Yes||1 No|
Answer / tayyab
When two object create a reference to each other. memory
allocated to these objects can not be reclaimed by
operating system even after when all other references are
deleted for these objects.....this concept is called memory
|Is This Answer Correct ?||0 Yes||1 No|
WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?
what is the mean of c languages.
what is an inline fuction??
Determine the code below, tell me exactly how many times is the operation sum++ performed ? for ( i = 0; i < 100; i++ ) for ( j = 100; j > 100 - i; j--) sum++;
i want to have a program to read a string and print the frequency of each character and it should work in turbo c
My teacher ask to make a program that can: Insert record in front Insert record at the end Insert in between Search node record Delete record in front Delete record at the end Delete record in between Using Data structure Linked List type. But I'm really confused about the codes and I can't go through. Please help Thanks in advance. Also here is my unfinished code if someone can make changes it will be more good.
write a program in c language to print your bio-data on the screen by using functions.
how can we use static and extern?and where can we use this?
what is a headerfile?and what will be a program without it explain nan example?
Why doesn't the code "int a = 1000, b = 1000; long int c = a * b;" work?
What is the difference between void main() and void main (void) give example programme?