You specify an array of 9 elements, and yet you have 10 elements in the initialiser and in your outer loop:
int array[9]={5,2,7,4,7,6,9,8,1,3};
// ^- this is not the last index, but the number of elements!
for(i=0;i<10;i++)
And here you iterate up to index 10, which is the 11th element (index 0 is the first):
for(j=0;j<=10;j++)
//^- when j is 10 this is still true, but there is no array[10]
To fix, change to the following:
int array[] = {5,2,7,4,7,6,9,8,1,3};
// ^- leave empty and let the compiler count the elements
const int array_len = sizeof(array) / sizeof(*array);
// length: ^- whole array / ^- one element
for (i = 0; i < array_len; ++i) {
for (j = 0; j < array_len; ++j) {