We define flux of an electric field $\vec{E}$ through a surface $S$ as
$$\Phi =\int_S\vec{E}.d\vec{s}$$
Now we define flux through a surface as stated above
What does it mean when we say flux coming out of a $q$ charge is $\displaystyle\frac{q}{\epsilon_0}$ ?
I think this statement is not correct because flux is not something which comes out of a charge and even if it would have been like that why would it will always be $\displaystyle\frac{q}{\epsilon_0}$ until we have a closed surface around it rather we have electric lines of forces which can originate from a charge.
The doubt arise when my teacher said that flux of arbitrary closed surface having $q$ charge inside it is $\displaystyle\frac{q}{\epsilon_0}$ because flux originating/emitting from the $q$ charge is $\displaystyle\frac{q}{\epsilon_0}$.
The correct statement should have been flux of a spherical closed surface having $q$ charge inside it is $\displaystyle\frac{q}{\epsilon_0}$ and since relative number of field lines originating from $q$ charge is same for both spherical surface and arbitrary surface , therefore flux through both is same