Asked by
Saloni Gupta
on Oct 27, 2024Verified
Which of the following is used to allocate memory for the instance variables of an object of a class?
A) the reserved word public
B) the reserved word static
C) the operator new
D) the operator +
Operator New
"Operator new" is used in programming languages like C++ to allocate memory for an object or an array of objects on the heap.
- Familiarize yourself with the elementary concepts of object-oriented programming, encompassing classes, methods (public and private), constructors, and objects.
Verified Answer
KE
Learning Objectives
- Familiarize yourself with the elementary concepts of object-oriented programming, encompassing classes, methods (public and private), constructors, and objects.