Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- //array with 5 rows and 2 columns
- //int a [5][2] = {{0,0}, {0,1}, {2,9}, {4,7}, {9,5} }; - actually equivalent
- int a [5][2] = {{0,0},
- {0,1},
- {2,9},
- {4,7},
- {9,5} };
- int i, j;
- //output ea array element's value
- for(i = 0 ;i < 5;i++){
- for(j = 0; j < 2; j++)
- {
- printf("numbers[%d][%d] =%d\n", i,j, a[i][j] );
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement