The fgets function in this loop:
Is being skipped on the first loop, but on the rest of the loops it runs, any help as to why that happens? the entire file that snippet is from is attached at the bottom.Code:for(int i = 1; i < players + 1; i++) { printf("Enter your name player %d\n", i); //ask for name fgets(player_name[i], sizeof(player_name[i]), stdin); //get name putchar('\n'); }
school.c