what are the various memory handling mechanisms in C ?

Answer Posted / priya

The malloc function allows the programmer to create a block of memory of a given size:

malloc ( long integer lBlockSize ) returns void *

If we decide, during the execution of the program, that we might need to expand, or contract this memory block, we can use the realloc function:

realloc ( void * pBlock, long int lNewBlockSize ) returns void *

When the memory block is no longer used, then it must be returned back to the operating system, by calling the free function:

free ( void * pBlock )

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is = symbol different from == symbol in c programming?

602


What is ctrl c called?

584


if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.

4482


pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)

2193


Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop

1702






How can a number be converted to a string?

586


Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent

1421


Define and explain about ! Operator?

606


What does == mean in texting?

653


What is the purpose of void in c?

609


Write a program to reverse a given number in c?

585


In C language what is a 'dangling pointer'?

627


Can you apply link and association interchangeably?

661


Can one function call another?

616


What are the different types of linkage exist in c?

600