So far I have:
code:#include <stdio.h>
void printArray (const int a[][5]);
void main (void)
{
int array1[][5]={15, 13, 80, 5, 16};
int array2[][5]={10, 9, 100, 6, 15};
int Sum_Array, Diff_Array;printf ("Values in array1 are:\n");
printArray(array1);printf ("Values in array2 are:\n");
printArray(array2);}
void printArray (const int a[][5])
{
int i;
int j;for (i=0; i<=1; i++){
for (j=0; j<=2; j++){
printf ("%d ", a[i][j]);
}printf ("\n");
}
}
In my first array, I keep getting -4195236, and a couple of other weird, large negative numbers. I have no idea why, I follwed the example that was given in class. Any suggestions?
If you're going to be taking any more programming classes, I suggest learning how to use gdb--it's very, very helpful. Alidane fucked around with this message on 11-29-2005 at 08:48 PM.
No, Really. Bite me.