A diagonal is a line segment joining two vertices whereas those vertices are not sharing the same edge.
Therefore,
The number of diagonals that can be drawn by joining ‘n’ vertices = (Total edges possible) – n
= C(n,2) – n
So for octagon the no. of diagonals possible = 20
(C) is the answer