If we have $X$ number of resources where $X$ is sum of $r_i-1$ where $r_i$ is the resource requirement of process $i$, we might have a deadlock. But if we have one more resource, then as per Pigeonhole principle, one of the process must complete and this can eventually lead to all processes completing and thus no deadlock.
Here, $n = 3$ and $r_i = 2$ for all $i$. So, in order to avoid deadlock minimum no. of resources required
$=\displaystyle{\sum_{i=1}^{3}} (2-1) + 1 = 3 + 1 = 4.$
PS: Note the minimum word, any higher number will also cause no deadlock.
Correct Answer: $C$