#include using namespace std; //pointer in parameter //myPtrArrayNew1.cpp void showArray(int * x); int main() { int *ptr1,num ; int n1[4] = {1,2,3,4}; ptr1 = n1; // cout<<"\n no of obseravation "; cout<<"\n Enter four integers \n "; for(int i=0; i < 4; i++) { cout<<" entry " << i << " "; cin>> ptr1[i]; } cout<<"\n passing pointer to a function"; showArray(ptr1); delete[] ptr1; return 0; } void showArray(int * x) { cout<<"\n You Entered "; for(int i=0; i < 4; i++) { //cout<<" entry " << i +1 << " "; cout<< " " << x[i]; } }