And I'm sure in your fscanf you meant to type ords[k].dan[i] vice ords[i].dan[i]?

EDIT: too slow