Skip to content
Related Articles

Related Articles

C++ | new and delete | Question 1

View Discussion
Improve Article
Save Article
  • Difficulty Level : Medium
  • Last Updated : 29 Jul, 2020

How to create a dynamic array of pointers (to integers) of size 10 using new in C++?

Hint: We can create a non-dynamic array using int *arr[10]
(A) int *arr = new int *[10];
(B) int **arr = new int *[10];
(C) int *arr = new int [10];
(D) Not Possible

Answer: (B)

Explanation: Dynamic array of pointer having size 10 using new is created as,

int **arr = new int *[10]; 

So, option (B) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!