#include <stdio.h>
#include <stdlib.h>
void matriz_ponteiro(int mtr[3][4]) {
for (int lin = 0; lin < 3; lin++) {
for (int col = 0; col < 4; col++) {
printf("\t%d", mtr
[lin
][col
]); }
}
}
int main () {
int mtr[3][4];
int cont = 0;
for (int lin = 0; lin < 3; lin++) {
for (int col = 0; col < 4; col++) {
mtr[lin][col] = cont++;
}
}
matriz_ponteiro(mtr);
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCnZvaWQgbWF0cml6X3BvbnRlaXJvKGludCBtdHJbM11bNF0pIHsKICAgICBmb3IgKGludCBsaW4gPSAwOyBsaW4gPCAzOyBsaW4rKykgewoJICAgIGZvciAoaW50IGNvbCA9IDA7IGNvbCA8IDQ7IGNvbCsrKSB7CgkgICAgICAgICBwcmludGYoIlx0JWQiLCBtdHJbbGluXVtjb2xdKTsKCSAgICB9ICAgCiAgICAgICAgcHJpbnRmKCJcbiIpOwogICAgfQp9CgppbnQgbWFpbiAoKSB7CglpbnQgbXRyWzNdWzRdOwoJaW50IGNvbnQgPSAwOwoJZm9yIChpbnQgbGluID0gMDsgbGluIDwgMzsgbGluKyspIHsKCSAgICBmb3IgKGludCBjb2wgPSAwOyBjb2wgPCA0OyBjb2wrKykgewoJICAgICAgICAgbXRyW2xpbl1bY29sXSA9IGNvbnQrKzsKCSAgICB9Cgl9CgltYXRyaXpfcG9udGVpcm8obXRyKTsKfQ==