The code below prints -29368 as output at the end if I enter order of matrix 2 and 2 AND Value of matrix as 1,2,3,4
I wonder what that -29368 refers to? is it memory address or anything else?
Code:
int matrix[3][3],i,j,n,c;
clrscr ();
printf ("Please enter the order of matrix\n");
scanf ("%d and %d", &n, &c);
printf ("The order of matrix you entered is &d and &d\n", n, c);
printf ("please enter the value of matrix\n");
for (i = 0; i<n; i++)
for (j = 0; j<c; j++)
scanf ("%d", &matrix[i][j]);
printf ("So the matrix is \n");
for (i = 0; i<n; i++)
{
for (j = 0; j < c; j++)
printf ("%d \t", matrix[i][j]);
printf ("\n");
}
printf ("%d\t", matrix[i][j]);
getch ();
return 0;
}