I understand the algorithm SelectionSort, but once again my problem is the easy part( i think the college life is affecting my mind ).
How in the world do you read in an unknown number of ints from a file? I thought i did it right but when i run selectionsort it prints out from A[0] to A[100000] when 100000 is the maximum amount of numbers. The file i created only has about 20.
heres my code
do{
fscanf( fin, "%d", &A[i] );
printf( "%d ", A[ i ] );
i++;
}while( A[i] != EOF );