from c to c+6 you have seven cells
from r to r+7 you have eight cells
¿why are you checking fourteen cells when you should only be looking at four?
that's supposed to work for an horizontal line, yet you move on `r' (vertically)
take one of your checks board[r][c+5] == board[r+6][c]
those points are not even near
also, you just ask them both to be the same, they may be empty, or from a different color that the starting cell
given that r goes from [0; 5], then r+7 goes from [7; 12]
¿do those cell even exist?
// Check for a winner.
// Return 'X' or 'O' if one of them wins.
// Return 'F' if the board is fill.
// Return 'C' if there is no winner and play should continue
char checkWinner()
{
// Check for horizontal winner
for (r=0; r<6; ++r) {
for (c=0; c<4; ++c) {
if ((board[r][c] == 'X' || board[r][c] == '0') &&
board[r][c] == board[r][c+1] &&
board[r][c] == board[r][c+2] &&
board[r][c] == board[r][c+3]) {
return board[r][c];
}
}
}
// To Do: Check for vertical and diagonal winner, and for a full board.
return'C';
}