#include <stdio.h>
void a(int (*z)[3], int r); // 関数宣言
void b(int z[2][3]); // 関数宣言
int main(void) {
int x[2][3] = {0}; // 2x3の配列を初期化
int y = 2;
a(x, y); // 配列xと値yを渡す
b(x); // 配列xを表示
return 0;
}
void a(int (*z)[3], int r) {
for (int i = 0; i < 2; i++) {
for (int j = 0; j < 3; j++) { // j++に修正
z[i][j] = r;
}
}
}
void b(int z[2][3]) {
for (int i = 0; i < 2; i++) {
for (int j = 0; j < 3; j++) { // j++に修正
}
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIGEoaW50ICgqeilbM10sIGludCByKTsgICAvLyDplqLmlbDlrqPoqIAKdm9pZCBiKGludCB6WzJdWzNdKTsgICAgICAgICAgIC8vIOmWouaVsOWuo+iogAoKaW50IG1haW4odm9pZCkgewogICAgaW50IHhbMl1bM10gPSB7MH07ICAgLy8gMngz44Gu6YWN5YiX44KS5Yid5pyf5YyWCiAgICBpbnQgeSA9IDI7CgogICAgYSh4LCB5KTsgICAvLyDphY3liJd444Go5YCkeeOCkua4oeOBmQoKICAgIHByaW50ZigiYXJyYXkgeFxuIik7CiAgICAKICAgIGIoeCk7ICAgLy8g6YWN5YiXeOOCkuihqOekugoKICAgIHJldHVybiAwOwp9Cgp2b2lkIGEoaW50ICgqeilbM10sIGludCByKSB7CiAgICBmb3IgKGludCBpID0gMDsgaSA8IDI7IGkrKykgewogICAgICAgIGZvciAoaW50IGogPSAwOyBqIDwgMzsgaisrKSB7ICAvLyBqKyvjgavkv67mraMKICAgICAgICAgICAgeltpXVtqXSA9IHI7CiAgICAgICAgfQogICAgfQp9Cgp2b2lkIGIoaW50IHpbMl1bM10pIHsKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgMjsgaSsrKSB7CiAgICAgICAgZm9yIChpbnQgaiA9IDA7IGogPCAzOyBqKyspIHsgIC8vIGorK+OBq+S/ruatowogICAgICAgICAgICBwcmludGYoIiVkICIsIHpbaV1bal0pOwogICAgICAgIH0KICAgICAgICBwdXRjaGFyKCdcbicpOwogICAgfQp9Cg==