Machine-translated by Google. Questions are authored in English.
Top

Discussion

In CPP, dynamic memory allocation is done using ______________ operator. 

  • A.calloc()
  • B.malloc()
  • C.allocate
  • D.New

Answer: D

Correct answer: New

In C++ dynamic memory is obtained with the new operator and released with delete. malloc and calloc are C library functions, and unlike new they do not call a constructor.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.