
Answer:
#include<iostream>
using namespace std;
int main()
{
 int a[20],n;
 int *p;
 cout<<"\n enter how many values do you want to enter:";
 cin>>n;
 for(int i=0;i<n;i++)
 {
   cout<<"\n Enter the "<<i+1 <<"th value :";
   cin>>*(p+i);
   //reading the values into the array using pointer
 }
 cout<<"\n The values in the array using pointer is:\n";
 for(int i=0;i<n;i++)
 {
   cout<<"\n (p+"<<i<<"): "<<*(p+i);
   //here we can use both *(p+i) or p[i] both are pointer subscript notations
 }
}
Output: