I wrote a Tic Tac Toe game, using tutorials. Now I'm just going trough the code to see what i don't understand and I came up with this part, witch is confusing me.
char userInput[4];
int moveOk = 0;
int move = -1;
while(moveOk == 0)
{
printf("Enter a number from 1 - 9: ");
fgets(userInput, 3, stdin);
fflush(stdin);
printf("\n\n");
*The code continues, but the rest of it is not important*
How does this part work? I don't even know how to formulate the question. Sorry. So what are the three values in fgets(); and how to they interact with each other?
fgets(userInput, 3, stdin);
fflush(stdin);