I've got the following function:
The output is:Code:void deck() { int cards[14][4]; int a; int b; for (b = 0; b < 4;b++) { for (a = 1; a < 15; a++) { cards[a][b] = a; printf("%d\n",cards[a][b]); } } return; }
I notice it sort of crashes in the 3rd time it does the b loop. At least it puts a silly value in cards[14][3]Code:1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 2 3 4 5 6 7 8 9 10 11 12 13 -304991592
and then stops doing the loop.
Could anybody help?
Thank You.