You'll get returned whatever xarray[0][0] is before someone makes a move there since the first row is all equal to itself. You should pass a character to the function to check for after each move.
For example:
1 2 3 4 5 6 7 8 9 10
// Player 1 moves
if (Checker(player_1_piece))
// Player 1 won ...
bool Checker(char player) {
for(i=0;i<3;i++)
if(xarray[i][0] == player && xarray[i][0] == xarray[i][1] && xarray[i][1] == xarray[i][2]){
returntrue;
}
// ...
The only thing that you need to add is the check to make sure that the row that is equal (or column or diagonal) has the players shape. If it does, it should return true, otherwise, your else statement should return false. I assume you have a player's turn variable used to check to see who's turn it is as well so that once someone wins, you can exit the loop and display this is the winner. If 9 moves have gone and no one wins, then it's a draw.
I accidentally exited the page after I wrote up a good explanation for you, but I suggest changing NULL to ' ' since I don't believe that NULL is valid for type char.
I'd also suggest consolidating your move functions into one function and pass the character to print to the board.
Also, there really is no need for a random number function when the entire thing could just be replaced by rand() % 3 so you would write x = rand() % 3; and it'll do the exact same thing.
One last thing to point out is that I suggest against using any global variables, but I noticed you don't have any functions that accept parameters. I'm guessing you're just starting with C++, or C, it's unclear which language you're preferring. What is the purpose of player1 and player2 in main? Main should also always return 0 unless there was an issue. If you'd like more assistance, private message me and I'll see what I can do for you.