- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPointers.cpp
More file actions
Latest commit
27 lines (27 loc) · 411 Bytes
/
Copy pathPointers.cpp
File metadata and controls
27 lines (27 loc) · 411 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include<iostream>
usingnamespacestd;
intmain()
{
int arr[3][3];
int i,j;
int *ptr;
cout<<"Enter the elements of the array:\n";
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
cin>>arr[i][j];
}
}
//ptr=arr;
cout<<"Elements of the array and addresses are:\n";
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
cout<<"\t"<<((arr+i)+j);
}
cout<<"\n";
}
return0;
}