The C++ operator ______ can be used to request memory allocation for a variable dynamically.
- allocate
- create
- malloc
- new
The C++ operator new can be used to request memory allocation for a variable dynamically. It is used in C++ to allocate memory on the heap for objects or data structures during runtime.
Loading...
Related Quiz
- What is the primary purpose of encapsulation in object-oriented programming in C++?
- What is the potential risk of passing parameters by reference?
- Robert is working on financial software and needs to store very precise values for currency calculations. Which data type should he consider?
- A for loop that doesn’t specify the initialization, condition, and increment is known as a _______ loop.
- When passing parameters by reference, which symbol is used to denote reference in C++?