The black shapes in the figure below are closed surfaces. The electric field lines are in red. For which case the net flux through the surfaces is non-zero?

From the KVPY 2017 · Streams SB/SX · 19 Nov paper. Try it, check your answer, then read the worked solution below.
The black shapes in the figure below are closed surfaces. The electric field lines are in red. For which case the net flux through the surfaces is non-zero?

Try it yourself first, then check your working against this.
Worked solution
The net flux through a closed surface is non-zero only when it encloses the charge. In (a) and (b) the charge is inside; in (c) and (d) it is outside, so every field line that enters also leaves. Only (a) and (b).
(C)
Concepts used: flux through closed surfaces, enclosed charge
Every past question tagged to the same part of the syllabus, with solutions.
Past questions on the same topic (Electric flux and Gauss's law), each with a worked solution.
Timed, in the real format, and marked the moment you submit.