CS153/hw5/hw4programs/arrayargs1.oat
jmug 9224001a22 Update hw5 to a newer version.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
2025-01-24 21:10:31 -08:00

16 lines
241 B
Text

int[] f(int[] x, int[] y, bool b) {
if ( b ) {
return x;
} else {
return y;
}
}
global x = new int[]{1, 2, 3};
global y = new int[]{4, 5, 6};
int program (int argc, string[] argv) {
f(x, y, true)[0] = 17;
return x[0];
}