InterviewSolution
| 1. |
Explain the concept of Memory allocation in C/C++. |
|
Answer» C/C++ uses calloc( ) function to allocate a particular amount of memory area. It comprises of TWO settings and the resulting length will be the product of its two parameters. Calloc works in C/C++ by filling the memory area with Zeros and then returning a pointer to the first byte. If the calloc() function FAILS to locate ENOUGH space it the CPU, it simply returns the NULL pointer. |
|