Which of the following statements is true about the new and malloc? I. The…

Which of the following statements is true about the new and malloc? I. The ‘new’ is a type of operator while ‘malloc’ is a kind of function. II. The ‘new’ invokes a constructor, whereas ‘malloc’ does not invoke the constructor. III. The ‘malloc’ returns void pointer and also needed to typecast whereas ‘new’ returns required pointer.

  1. A.

    Only I

  2. B.

    Both I and II

  3. C.

    Both II and III

  4. D.

    More than one of the above

  5. E.

    None of the above

Attempted by 291 students.

Sign up free to check your answer

Sign up free

Explore the full course: Bpsc

Loading lesson…