This is a program my teacher wrote for us as an example. You would have to modify it to work the way you want it to, but as it stands it sorts in ascending order. You must change it to descending and add file input, so you still have some work to do if you don't understand the code. Good luck.
Code:
/*
This program sorts an array's values into
ascending order using bubble sort.
*/
#include <stdio.h>
#define ARRAYSIZE 10
void bubbleSort(int [], int);
int main()
{
int a[ ] = { 6, 4, 8, 10, 12, 89, 68, 45, 2, 37 }; //Initialize the array
int i;
printf("Data items in original order\n");
for (i = 0; i < ARRAYSIZE; i++ )
printf("%d ", a[ i ]);
bubbleSort(a, ARRAYSIZE);
return 0;
}//end int main()
void bubbleSort(int x[], int arraySize)
{
int temp;
int pass;
int i;
for ( pass = 0; pass < arraySize - 1; pass++ ) // passes
{
for ( i = 0; i < arraySize - pass - 1; i++ )
{
if ( x[ i ] > x[ i + 1 ] ) //swap
{
temp = x[ i ];
x[ i ] = x[ i + 1 ];
x[ i + 1 ] = temp;
}//end if ( x[ i ] > x[ i + 1 ] )
}//end for ( i = 0; i < arraySize - pass; i++ )
}//end for ( pass = 0; pass < arraySize - 1; pass++ )
printf("\n\nData items in ascending order\n");
for (i = 0; i < arraySize; i++ )
printf("%d ", x[ i ]);
printf("\n\n");
}//end void bubbleSort(int x[], int arraySize)