After insertion, the hash table becomes:
Index $0$: $98$
Index $1$: $22$
Index $2$: $30$
Index $3$: $87$
Index $4$: $11$
Index $5$: $40$
Index $6$: $6$
Index $7$: $20$
Index $8, 9, 10$: empty
Hash Table :
$\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
\text{Index} & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\
\hline
\text{Key} & 98 & 22 & 30 & 87 & 11 & 40 & 6 & 20 & \text{-} & \text{-} & \text{-}\\
\hline
\end{array}$
Since the hash function is $key \bmod 7$, an unsuccessful search can start only from initial addresses $0$ to $6$.
Count probes until the first empty slot is reached:
For start $0$: check $0,1,2,3,4,5,6,7,8$, so $9$ probes
For start $1$: $8$ probes
For start $2$: $7$ probes
For start $3$: $6$ probes
For start $4$: $5$ probes
For start $5$: $4$ probes
For start $6$: $3$ probes
Probe count table :
$\begin{array}{|c|c|c|c|c|c|c|c|}
\hline
\text{Start Index} & 0 & 1 & 2 & 3 & 4 & 5 & 6 \\
\hline
\text{Probes till empty} & 9 & 8 & 7 & 6 & 5 & 4 & 3 \\
\hline
\end{array}$
So the average unsuccessful search length is:
$(9+8+7+6+5+4+3)/7 = 42/7 = 6$
Answer: C