#include
using namespace std;
const int M = 5;
const int N = 3;
int main()
{
int a[M][N] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
int *p = a[0];
for(int i = 0;i < M;i++) // M = 5
{
for(int j = N-1;j >= 0;j--) // N = 3
{
cout << *(p + i + j*M) << ","; // M = 5;
}
cout << endl;
}
return 0;
}
运行结果: