1)What is the V vector? How did they compute that
It's the vector toward the camera (view vector), i.e. direction of the reflected ray. The lookup table they're building is parameterized in terms of NdotV, so they are working backward from NdotV to obtain a corresponding V vector. For purposes of doing this integration it doesn't matter what N and V are exactly, just that they have the correct NdotV. So, just to make things concrete, they assume that $N = (0,0,1)$ and V is aligned with the positive x-axis (i.e. in the positive xz half-plane). Then you have $V = (\sin θ, 0, \cos θ)$ where θ is the angle from N to V (this is just the equation for a circular arc from z down to x). Now $N \cdot V = \cos θ$, so by a standard trig identity $\sin θ = \sqrt{1 - \cos^2 θ} = \sqrt{1 - (N \cdot V)^2}$.
2)Why have they assumed N=(0,0,1)?
This whole thing is a pre-integration of the BRDF alone, it doesn't depend on any scene or lighting environment. So it doesn't matter where the BRDF is or how it is oriented in space, only the relative orientation between the N, L, and V vectors is important. So just for the sake of convenience they have chosen to fix N = (0, 0, 1), let V vary only in the xz half-plane as mentioned above, and let L vary over the whole hemisphere. To put it another way, they have chosen to set the coordinate system to be aligned with N and V.
3)why is NDotL=max(L.z,0)? How did they simplifying a dot product to an min/max Operation same question I have for NDotH
Since N = (0, 0, 1), dotting N with any vector just takes the z component of that vector. $N \cdot L = 0L_x + 0L_y + 1L_z = L_z$. (This is why it's convenient to assume a coordinate system in which N = (0, 0, 1).) Taking the max with 0 clamps it to the upper hemisphere, otherwise the dot product would go negative if the vector happens to be pointing below the hemisphere. This clamp is a standard thing to do when dealing with opaque BRDFs to avoid accidentally getting unwanted negative values in your calculations— although it is not really necessary here since they check if (NdotL > 0.0)
immediately afterward.
4)G_Vis=GVDoth/(NDotHNDotL) why the division by (NDOTH*NDOTL)? that was nowhere in the equation.
It is a standard part of the microfacet BRDF formulation:
$$
f_r(p, w_i, w_o) = \frac{DFG}{4(\omega_o \cdot n)(\omega_i \cdot n)}
$$
Note that $\omega_o = V$, and $\omega_i = L$, these are just different notations/names for the incoming and outgoing light vectors.
However I think there is a typo in the code, the denominator should contain NdotV rather than NdotH. I am also not sure why there is a multiplication by VdotH in the numerator, or where the factor of 4 went, but perhaps they have accounted for it elsewhere. I would probably double-check the BRDF equations here against some other sources as I don't think it's entirely correct.
5)what is vector L? it looks like they have reflected vector V about H to get this but why?
As noted, L is the vector toward the incoming light. H is the "half-angle" vector exactly halfway between L and V, so reflecting V around H will give you L, or vice versa. The significance of H is that in microfacet BRDFs, it is the normal vector of those microfacets that are "active" for a given L and V. So, to importance-sample a BRDF, we sample a random normal vector from the NDF, and use that as H. Since H and V are specified, we then calculate L from those.