The correct option is B 8
Coefficient of middle term is numerically the greatest coefficient in the expansion of (1−x)n or (1+x)n.
nCr is maximum at r=⎧⎪
⎪⎨⎪
⎪⎩n2,if n is evenn−12 or n+12,if n is odd
Given that coefficient of 5th term is the greatest, therefore 5th term is the middle term.
So, there are total 9 terms.
Hence, n=8