Regarding countnqueens

Sir you are applying loop according to row value but checking for the column can you please elaborate it?

for(int i=row;i>=0;i–{
if(board[i][col]){
return false;