1.

Which of the following function can be used for dynamic memory allocation of objects?(a) malloc()(b) calloc()(c) create()(d) malloc() and calloc()I have been asked this question during an internship interview.I need to ask this question from Memory Allocation of Object in division Object of Object Oriented Programming

Answer»

The correct CHOICE is (d) malloc() and calloc()

Easy explanation - The malloc() function can be used to allocate dynamic MEMORY for OBJECTS. Function calloc() can also be USE. These functions DIFFER in the way they allocate memory for objects.



Discussion

No Comment Found

Related InterviewSolutions