InterviewSolution
| 1. |
What is Dynamic memory allocation in C? Name the dynamic allocation functions. |
|
Answer» C is a language known for its low-level control over the memory allocation of variables in DMA there are two major standard library malloc() and FREE. The malloc() function takes a single INPUT parameter which tells the size of the memory requested It returns a pointer to the allocated memory. If the allocation fails, it returns NULL. The prototype for the standard library function is like this: void *malloc(size_t size); void free(void *pointer);
|
|