Thanks again Salem. I figured it out after sweating over it for a long time:

Code:

for(int i = 0; i < N; i++)
{
int rowCount = 0, colCount = 0;
for(int j = 0; j < N; j++)
{
if (data->ary[i][j] == 'Q') rowCount++;
if (data->ary[j][i] == 'Q') colCount++;
}
if (rowCount != 1 || colCount != 1) return false;
}
for(int i = 0; i < N-1; i++)
{
int downwardRightUpper = 0, downwardRightLower = 0,
downwardLeftUpper = 0, downwardLeftLower = 0;
for(int j = 0, k = i; k < N; j++, k++)
{
if(data->ary[j][k] == 'Q') downwardRightUpper++;
if(data->ary[k][j] == 'Q') downwardRightLower++;
if(data->ary[j][N-1-k] == 'Q') downwardLeftUpper++;
if(data->ary[k][N-1-j] == 'Q') downwardLeftLower++;
}
if(downwardRightUpper > 1 || downwardRightLower > 1
downwardLeftUpper > 1 || downwardLeftLower > 1) return false;
}
return true;
}

All the best,

Steve