The given diagram represents a cylinder placed in a uniform electric field.
Let φ1 and φ2 be the flux coming out of a circular cross-sectional surface. φ3 is flux through the curved surface. Since, normal to a curved surface is always 90∘ to electric field E, so φ3=Eds3‌cos‌θ=Eds3‌cos‌90∘=0 φ1 and φ2 are equal and opposite to each other, hence φ1+φ2=0. So, total flux through the surface of cylinder is zero.