0
int a[5]={1,2,3,4,5};
int*p=a;
cout<<4[p];
return 0;

can anyone please tell me how it is giving output 5. i know it is 5 because it is the 4th element in the array. but why is 4[p] giving the output!

Pavel Anikhouski
  • 21,776
  • 12
  • 51
  • 66

0 Answers0