C - adding valid user input into character array?

So I'm trying to add an array called char usersAnswers[10] which holds up to 10 answers as there are only 10 rounds in my game. My struggle is finding a way to implement every valid answer the user gives into that array. I was thinking of adding a for loop below the second if statement and doing something like... show more So I'm trying to add an array called char usersAnswers[10] which holds up to 10 answers as there are only 10 rounds in my game. My struggle is finding a way to implement every valid answer the user gives into that array. I was thinking of adding a for loop below the second if statement and doing something like usersAnswers[i] = userInput but I wasn't sure. Any help would be appreciated.

My part of code:

if(numberofCharacters == 3){
if((answerValid(userInput))){
numberofAnswers += 1;
}else{
printf("Please try again. \n");
}
}else{
printf("Only enter 3 characters. \n");
}

What I planned to do was:

if((answerValid(userInput))){
numberofAnswers += 1;
for(int i = 0; i < 10; i++){
usersAnswers[i] = userInput;
}

but I thought that might be a problem because there's no condition below the for loop. I thought it'd make every element in the array the same answer at once cause there's no other if statement or condition stopping that for loop?
2 answers 2