The following code is the answer that I found to this challenge
int main() {
int x,y,s=0;
cin>>x>>y;
int *arr[x];
while(x--)
{
int num;
cin>>num;
arr[s]=new int[num];
for(int i = 0; i<num ; i++)
{
cin>>arr[s][i];
}
s++;
}
while(y--)
{
int a,b;
cin>>a>>b;
cout<<arr[a][b];
cout<<"\n";
}
return 0;
}
My question is how "arr" which is a pointer array can store values of the array elements in line 13 and also print the array elements in line 21.
To use the value stored in the array we must use an asterisk right? Then how is it possible to scan and print elements in the pointer array without an asterisk as a prefix?