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
(A) int *arr = new int *;
(B) int **arr = new int *;
(C) int *arr = new int ;
(D) Not Possible
Explanation: Dynamic array of pointer having size 10 using new is created as,
int **arr = new int *;
So, option (B) is correct.
Quiz of this Question
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.