Search unanswered questions...
Enter a question here...

What is a malloc function in c programming?

[Edit]

Answer

Malloc is the memory allocation function in C. C requires memory to be manully allocated for some data structures. Malloc will allocate a section of memory of a given size for the data structure. Hope that helps. Sorry I don't have more information off hand. Happy programming.

Jimbobbery

Answer

The malloc() function allocates memory from the heap. Global and static variables are placed in similar global memory. Automatic variables, declared inside functions, are placed on the heap.

This is somewhat compiler dependent.

Improve Answer Discuss the question "What is a malloc function in c programming?" Watch Question

First answer by Das Jimbobbery. Last edit by Simpleaspossible. Contributor trust: 49 [recommend contributor]. Question popularity: 13 [recommend question]

Research your answer:

Answers.com > Wiki Answers > Categories > Technology > Computers > Computer Programming > C Programming > What is a malloc function in c programming?

Our contributors said this page should be displayed for the questions below. (Where do these come from)
If any of these are not a genuine rephrasing of the question, please help out and edit these alternates.
How can you use the malloc?  What is meant by malloc function?  Programming access on malloc calloc?  How the malloc function can be improved upon in C?  Example of a program containing a malloc function?  Suggest how the malloc function can be improve upon?  Built in graphics function available in C programming syntaxeach function?