We use malloc and calloc for
Answer: A
Correct answer: Dynamic memory allocation
malloc and calloc obtain storage at run time from the heap, in a quantity that may be computed rather than fixed in the source. That is what dynamic allocation means.
Static allocation is settled by the compiler: globals and static variables are laid out before the program runs, and automatic variables are allocated by the function prologue. Neither requires a library call, which is the practical signal that they are a different mechanism. Dynamically allocated storage must be released with free; static storage never is.
Please log in or register to report this question.