What is the difference between these two methods of dynamic allocation of arrays?

54 Views Asked by At

I was going through array using pointers and I found two different dynamic allocation methods of an array

int *ptr_arr=new int[10];

This one was defined in the lectures but when I explored a bit I found a slightly different method:

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

Can someone please explain what's the difference between them?

0

There are 0 best solutions below