Concept:
A semiconductor is a material whose conductivity lies between that of a conductor and an insulator.
Examples:
\[
\text{Silicon},\quad \text{Germanium}
\]
In semiconductors, current is produced by two types of charge carriers:
\[
\text{Electrons}
\]
and
\[
\text{Holes}
\]
Step 1: Understand electrons in semiconductors.
When an electron gains enough energy, it moves from the valence band to the conduction band.
Electrons in the conduction band are free to move.
Their motion contributes to electric current.
Step 2: Understand holes in semiconductors.
When an electron leaves the valence band, it creates an empty place.
This empty place behaves like a positive charge carrier and is called a hole.
Holes also move through the crystal and contribute to current.
Step 3: Current contribution.
Total current in a semiconductor is due to:
\[
I=I_{\text{electron}}+I_{\text{hole}}
\]
So both electrons and holes participate in conduction.
Step 4: Check the options.
Option (A) electrons only is incomplete.
Option (B) holes only is incomplete.
Option (C) negative ions are not the main charge carriers in semiconductors.
Option (D) both electrons and holes is correct.
Hence, the correct answer is:
\[
\boxed{(D)\ \text{both electrons and holes}}
\]