Step 1: Understand the reaction.
The reagent \(H_2/Ni\) reduces carbon-carbon double bonds by hydrogenation.
\[
C=C \xrightarrow{H_2/Ni} C-C
\]
Step 2: Check optical activity condition.
A haloalkane is optically active if it contains a chiral carbon atom.
A chiral carbon is attached to four different groups.
Step 3: Analyse compound B.
In compound B, after hydrogenation of the double bond, the carbon bearing chlorine becomes attached to four different groups.
These groups are:
\[
Cl,\quad H,\quad CH_3,\quad \text{alkyl chain}
\]
Step 4: Formation of chiral haloalkane.
Since the carbon attached to chlorine has four different substituents, the product is optically active.
Step 5: Check other options.
In the other compounds, after hydrogenation, the carbon attached to chlorine does not become a proper chiral centre due to symmetry or identical groups.
Step 6: Identify correct compound.
Therefore, only compound B gives an optically active haloalkane after hydrogenation.
Step 7: Final conclusion.
\[
\boxed{B}
\]