Correct Answer (Detailed Explanation is Below)
D.
More than one of the above
Detailed Explanation
Answer: (D) More than one of the above
All three statements are correct.
Statement I: new is a C++ operator, whereas malloc() is a library function used for dynamic memory allocation.
Statement II: When new is used to create an object, the appropriate constructor is called. malloc() only allocates raw memory and does not call a C++ constructor.
Statement III: In C++, malloc() returns a void*, which traditionally requires conversion to the required pointer type. The new expression returns a pointer of the appropriate type.
Therefore, statements I, II and III are all true. Since the options do not provide an option saying exactly “I, II and III”, the intended answer is (D) More than one of the above.