As you have already understood by yourself your declaration is wrong. But
doesn't seem that you understood also why it is wrong.
The point is that
you have not declared an array of pointers, but a pointer to an array of integers!
The use of brackets emphasized the pointer nature of the declared variable 'ptr'.
Please see the following code that shows the declarations of:
1. An array of pointers to int
2. A pointer to an array of int
3. A pointer to an array of pointers to int
The code shows also the initialization of them.
int *ptr[5]; int var=100;
int var1 = 1, var2=2, var3=3, var4=4;
ptr[0]=&var;
ptr[1]=&var1;
ptr[2]=&var2;
ptr[3]=&var3;
ptr[4]=&var4;
int (*ptr1)[5]; int arr[5]={10,20,30,40,50}; ptr1 = &arr;
int *(*ptr2)[5]; ptr2 = &ptr;
Now back to your code there are many errors, because if your intent was to declare 'ptr' as an array of pointers to int you cannot assign to it the address of an int.
Any decent compiler should have throw a bunch of errors an a lot of warnings. Have you read them carefully?