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: All 1, 2 and 3

Make the most of this question

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

CPP Programming 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