The general molecular formula of an alkane is written as CnH2n+2, and the general formula of an alkene is written as CnH2n where ‘n’ is the number of carbon atoms.
Now for n=20, the molecular formula of
a) Alkane will be C20H2x20+2 or C20H42
b) Alkene will be C20H2x20 or C20H40