Array Elements Using Pointer

Description:

Write a Program to Accessing the array element using pointer which entered by the user Test Case 1 Input (stdin) 3 2 4 5 6 Expected Output You entered: 3 2 4 5 6 Test Case 2 Input (stdin) 12 34 21 31 11 Expected Output You entered: 12 34 21 31 11

Program :


#include <iostream>

using namespace std;

int main()

{

int a,b,c,d,e;

  cin>>a>>b>>c>>d>>e;

  cout<<"You entered:"<<endl<<a<<endl<<b<<endl<<c<<endl<<d<<endl<<e;

return 0;

}