1

Which of the following is true about new when compared with malloc. 1) new is an operator, malloc is a function 2) new calls constructor, malloc doesn't 3) new returns appropriate pointer, malloc returns void * and pointer needs to typecast to appropriate type.

Correct Answer: 1 and 2

Make the most of this question

This page focuses on one Object Oriented Programming (OOP) question from Engineering. After checking the answer, return to the topic list to practice more or run a timed set.

Object Oriented Programming (OOP) MCQ: Which of the following is true about new when compared with malloc. 1) new is an operator, malloc is a function 2) new calls constructor, malloc doesn't 3) new returns appropriate pointer, malloc returns void * and pointer needs to typecast to appropriate type. | Extra Education