Home / C Programming / Memory Allocation :: True / False Questions

C Programming :: Memory Allocation

  1. malloc() returns a float pointer if memory is allocated for storing float's and a double pointer if memory is allocated for storing double's.

  2. A.
    True
    B.
    False

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. malloc() allocates memory from the heap and not from the stack.

  4. A.
    True
    B.
    False

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. malloc() returns a NULL if it fails to allocate the requested memory.

  6. A.
    True
    B.
    False

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. If malloc() successfully allocates memory it returns the number of bytes it has allocated.

  8. A.
    True
    B.
    False

    View Answer

    Workspace

    Discuss Discuss in Forum