Sunday, June 6, 2021

program use the pointer in array (POP) (163)

 #include<iostream>

using  namespace std;

int main()

{

int i,num,array[100];

cout<<"please enter the number in the array:";

cin>>num;

for(i=1; i<=num; i++)

{

cin>>array[i];

}

cout<<"the entered numbers are:"<<endl;

for(i=1; i<=num; i++)

{

cout<<*(&array[i]);

}

}

No comments:

Post a Comment