codice:
 

    ...
    fscanf(fp, "%d", &i);
    while(!feof(fp))
    {
        printf("%d\n", i);
        fscanf(fp,"%d",&i);
    } 
    ...