Department of Computer Science | Institute of Theoretical Computer Science | CADMO

Theory of Combinatorial Algorithms

Prof. Emo Welzl and Prof. Bernd Gärtner

// Program: threedim_array.C // iterate over a multidimensional array #include int main() { int a[4][2][3] = { // the 4 elements of a: { // the 2 elements of a[0]: {2, 4, 5}, // the three elements of a[0][0] {4, 6, 7} // the three elements of a[0][1] }, { // the 2 elements of a[1]: {1, 5, 9}, // the three elements of a[1][0] {4, 6, 1} // the three elements of a[1][1] }, { // the 2 elements of a[2]: {5, 9, 0}, // the three elements of a[2][0] {1, 5, 3} // the three elements of a[2][1] }, { // the 2 elements of a[3]: {6, 7, 7}, // the three elements of a[3][0] {7, 8, 5} // the three elements of a[3][1] } }; return 0; }