I read about pointers and it says that
array names can be used as pointer constants and pointers can be used as array names
and here is an example that prove the first statement (array names can be used as pointer constants
)
#include<iostream>
using namespace std;
int main()
{
int arr[3]={10,20,30};
for(int i=0;i<3;i++)
cout<<*(arr+i);
return 0;
}
Do you have any example that prove the second statement(pointers can be used as array names
)?