Here is one problem:
Presumably you meant numPlayers to be i.Code:void DisplayPlayerData(const string playerNameAr[], const int scoreAr[], int numPlayers) ... for (int i = 0; i < numPlayers; i++) { cout << setw(10) << left << playerNameAr[numPlayers] << setw(5) << right << scoreAr[numPlayers] << endl; } ...
Applying my fix with previously mentioned fixes makes the output correct for me. If it does not for you, then provide up-to-date code and steps to get incorrect output.