struct player
{
int number;
char name[MAX];
char surname[MAX];
};
int main(int argc, char *argv[])
{
FILE * fp;
struct player arr[3];
fp = fopen("players.txt", "rb");
for (int index = 0; index < 3; index++)
fscanf(fp, "%d %s %s", &arr[index].number,
arr[index].name, arr[index].surname);
fclose(fp);
for (int index = 0; index < 3; index++)
{
puts("");
printf("%d %s %s", arr[index].number,
arr[index].name, arr[index].surname);
}
return 0;
}