Created
August 22, 2012 17:47
-
-
Save NYiPhoneDeveloper/3427873 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Multidimentional arrays | |
int n = 2, m = 4; | |
int matrix[n][m]; | |
int i = 0; | |
for (unsigned x = 0; x < n; x++) | |
{ | |
for (unsigned y = 0; y < m; y++) | |
{ | |
matrix[x][y] = i; | |
i++; | |
printf("Index: %d, %d = %d\n", x, y, matrix[x][y]); | |
} | |
} | |
/* | |
Creating a simple C multidimensional array, assigning it a value, then checking the value | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment