Explanation: The new operator usage to declare a 2D array requires a pointer and size of array to be declared. Data type and then the pointer with size of array. The left index can be left blank or any variable can be assigned to it. ... The new operator is used to allocate memory to the direct objects.
What is use of new operator?
The new operator lets developers create an instance of a user-defined object type or of one of the built-in object types that has a constructor function.
Which of the following is correct way to use new operator?
Use of the new operator signifies a request for the memory allocation on the heap. If the sufficient memory is available, it initializes the memory and returns its address to the pointer variable. The new operator should only be used if the data object should remain in memory until delete is called.