while ( fgets( input, 100, record) != NULL) { sscanf(input,"%d %f", &id[i], &page[i]); i++; }