#include <stdio.h>
int main (int argc, char *argv[])
{
int a[3][4] = {{1, 2, 3, 4},
{5, 6, 7, 8},
{9, 10, 11, 12}};
int i, j;
const int *p = (int *) a;
int x;
for (i = 0; i < 3; i++)
{
for (j = 0; j < 4; j++)
{
x = *(p + i * 4 + j);
//
printf ("a[%i][%i]=%i\t", i
, j
, x
); //
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbiAoaW50IGFyZ2MsIGNoYXIgKmFyZ3ZbXSkKewoKICBpbnQgYVszXVs0XSA9IHt7MSwgIDIsICAzLCAgNH0sCiAgICAgICAgICAgICAgICAgezUsICA2LCAgNywgIDh9LAogICAgICAgICAgICAgICAgIHs5LCAxMCwgMTEsIDEyfX07CiAgaW50IGksIGo7CiAgY29uc3QgaW50ICpwID0gKGludCAqKSBhOwogIGludCB4OwoKICBmb3IgKGkgPSAwOyBpIDwgMzsgaSsrKQogICAgewogICAgICBmb3IgKGogPSAwOyBqIDwgNDsgaisrKQogICAgICAgIHsKICAgICAgICAgIHggPSAqKHAgKyBpICogNCArIGopOwogICAgICAgICAgLy8KICAgICAgICAgIHByaW50ZiAoImFbJWldWyVpXT0laVx0IiwgaSwgaiwgeCk7CiAgICAgICAgICAvLwogICAgICAgIH0KICAgICAgcHJpbnRmICgiXG4iKTsKICAgIH0KCiAgcmV0dXJuIDA7Cn0=