Step 1: Pin down compound A from its formula and reaction with sodium.
A molecular formula of $C_2H_6O$ that liberates hydrogen gas on treatment with an active metal is the classic signature of an alcohol, so A is ethanol, $CH_3CH_2OH$, and reacting it with sodium gives sodium ethoxide (B) alongside hydrogen gas. \[ 2CH_3CH_2OH + 2Na \rightarrow 2CH_3CH_2ONa\,(B) + H_2\uparrow \]
Step 2: Identify C from the iodoform reaction.
Ethanol carries a $CH_3CH(OH)-$ type arrangement that responds to iodine and sodium hydroxide with the haloform reaction, producing the yellow solid iodoform (C) along with sodium formate. \[ CH_3CH_2OH + 4I_2 + 6NaOH \rightarrow CHI_3\,(C) + HCOONa + 5NaI + 5H_2O \]
Step 3: Identify D from the acid catalysed heating step.
Heating ethanol with concentrated sulphuric acid at 413 K brings about intermolecular dehydration that joins two ethanol molecules into an ether, giving diethyl ether (D), whose formula $C_4H_{10}O$ matches what is stated in the question. \[ 2CH_3CH_2OH \xrightarrow[413\,K]{H_2SO_4} CH_3CH_2OCH_2CH_3\,(D) + H_2O \]
Step 4: Identify E from the reaction of the ether with excess HI.
Excess hydroiodic acid cleaves both C-O bonds of the ether symmetrically, producing two molecules of ethyl iodide (E). \[ C_2H_5OC_2H_5 + 2HI \rightarrow 2C_2H_5I\,(E) + H_2O \] \[ \boxed{A=\text{Ethanol},\ B=\text{Sodium ethoxide},\ C=\text{Iodoform},\ D=\text{Diethyl ether},\ E=\text{Ethyl iodide}} \]