Q:

C - function to check how many time a letter appeared in array

I wrote a function to check how many time a letter appeared in array, but it's cause the program to stuck when it tries to read it. I think that the problem is this line if (board[i][j] == 'B'). Here is the function: (the name of the function is scoreb, it get double arr):
int scoreb (char board[size][size])
{
    int scoreb = 0,i=0,j=0;
    for (j = 0; i<size; j++)
    {
        for (i = 0; j<size; i++)
        {
            if (board[i][j] == 'B')
                scoreb++;
        }
    }
    return scoreb;
}

A:

In the inner loop for (i = 0; j<size; i++), j < size will never be false and loop will go infinite.  
Your loop should be like this 
for (i = 0; i < size; i++)
{
     for (j = 0; j < size; j++)
     {
         if (board[i][j] == 'B')
              scoreb++;
     }
}

