Question discussion

Which operator is used in C++ to allocate memory dynamically on the heap?

2385Medium DSSSB TGT Computer Science 0 replies 1 views
0

Which operator is used in C++ to allocate memory dynamically on the heap?

  • Adynamic
  • Balloc
  • Cnew
  • Dcreate
Correct answer: C

Explanation

The new operator allocates (and constructs) an object on the free store and returns a pointer to it; it is released with delete.

Discussion 0

Nobody has replied yet. Start the discussion!