the traversal is aborted when a is known not to be symmetric; it makes only necessary comparisons

for(i=1; i<n && ck; i++)

for(j=0; j <i && ck; j++)

if(a[i][j]! = a [j][i])

ck = FALSE;