#include <stdio.h> int main() { int nums[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; printf("%d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n", nums[0], nums[1], nums[2], nums[3], nums[4], nums[5], nums[6], nums[7], nums[8], nums[9]); printf("%d\n%d\n%d\n", nums[2], nums[5], nums[8]); int numsTable[5][6] = { {1, 2, 3, 4, 5, 6}, {7, 8, 9, 10, 11, 16}, {12, 13, 14, 15, 17, 30}, {18, 19, 20, 21, 22, 23}, {24, 25, 26, 27, 28, 29} }; // Iterate within the bounds of the numsTable array for (int i = 0; i < 5; i++) { for (int j = 0; j < 6; j++) { printf("Value of numsTable[%d][%d] is: %d\n", i, j, numsTable[i][j]); } } return 0; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter