Which of the following statements about new and malloc are true? I. 'new' is…
BPSC TRE 2023
Which of the following statements about new and malloc are true? I. 'new' is an operator while 'malloc' is a function. II. 'new' invokes a constructor, whereas 'malloc' does not invoke a constructor. III. 'malloc' returns a void pointer and needs to be typecast, whereas 'new' returns a pointer of the required type.
- A.
Only I
- B.
Both I and II
- C.
Both II and III
- D.
More than one of the above
- E.
None of the above
Attempted by 729 students.
Sign up free to check your answer
Sign up freeLoading lesson…

