1. Question:What is static memory allocation? 

    Answer
    Compiler allocates memory space for a declared variable. By using the address of operator, the reserved address is obtained and this address is assigned to a pointer variable. This way of assigning pointer value to a pointer variable at compilation time is known as static memory allocation.

    1. Report
  2. Question:What is dynamic memory allocation? 

    Answer
    A dynamic memory allocation uses functions such as malloc() or calloc() to get memory dynamically. If these functions are used to get memory dynamically and the values returned by these function are assigned to pointer variables, such a way of allocating memory at run time is known as dynamic memory allocation.

    1. Report
  3. Question:What is dynamic data structure? 

    Answer
    Dynamic data structure provides a means for storing data more efficiently into memory. Using dynamic memory allocation, your program will access memory spaces as needed. This is in contrast to static data structure, wherein the programmer has to indicate a fix number of memory space to be used in the program.

    1. Report
Copyright © 2024. Powered by Intellect Software Ltd