Doubt regarding a loop

if(reversal==“true”)
{
for(int i=0;i<n/2;i++)
swap(strPair[i],strPair[n-i-1]);
}
in this code snippet,why we’re traversing only till n/2?
and one more question is that why we’re comparing i’th pair with n-i-1?