```
# include <iostream.h>
void main()
{ int **a=new int*[10] ;
cout<<"ENter the no of arrays : " ;
int n ;
cin>>n ;
int i,p[5],x=0 ; ;
for(i=0 ; i<n ; i++)
{ cout<<"ENter the no. of elements in the "<<i+1<<" array :" ;
cin>>p[x] ;
a[i]=new int[p[x]] ;
for (int j=0 ; j<p[x] ; j++)
{ cout<<"enter : " ;
cin >> a[i][j] ;
}
x++ ;
}
x=0 ;
int j ;
for (i=0 ; i<n ; i++)
{ for(j=0 ; j<p[x] ; j++)
{ cout<<a[i][j]<<" " ;
}
x++ ;
}
}
```

1

Contributor0

Replies1

Views
Recommended Topics