logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • Differentiate between realloc() and free().


  • Correct Answer
  • - Free() - A block of memory previously allocated by the malloc subroutine is freed by free subroutine Undefined results come out if the Pointer parameter is not a valid pointer If the Pointer parameter is a null value, no action will take place - Realloc() - This subroutine changes the size of the block of memory pointed to by the Pointer parameter to the number of bytes specified by the Size parameter and returns a new pointer to the block The pointer specified by the Pointer parameter must be created with the malloc, calloc, or realloc subroutines and should not be deallocated with the free or realloc subroutines Undefined results show up if the Pointer parameter is not a valid pointer 


  • Technology problems


    Search Results


    • 1. What is the scope resolution operator?
    • Discuss
    • 2. Difference between Stack and Queue
    • Discuss
    • 3. What do you mean by stack unwinding?
    • Discuss
    • 4. What is a Wrapper class?
    • Discuss
    • 5. Exlpain STL.
    • Discuss
    • 6. List the advantages of inheritance
    • Discuss
    • 7. What is the role of QA in a project development?
    • Discuss
    • 8. What is severity and priority of bug? Give some example.
    • Discuss
    • 9. What is Monkey testing?
    • Discuss
    • 10. What are the benefits of Automated Testing?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment