Given that the probability density function of $X$ is $f\left ( x \right )=0.01;\;0\leq X\leq 100$.
The mean or expectation $E(X) = \displaystyle{} \int_{a}^{b} x f(x) dx$
$\implies E(X) = \displaystyle{} \int_{0}^{100} 0.01x\; dx$
$\implies E(X) = \displaystyle{}0.01 \int_{0}^{100} x\; dx$
$\implies E(X) = \displaystyle{}0.01 \left[ \dfrac{x^{2}}{2}\right]_{0}^{100}$
$\implies E(X) = 0.01 \left[ \dfrac{100^{2}}{2} – \dfrac{0^{2}}{2}\right]$
$\implies E(X) = 0.01 \left[ \dfrac{100^{2}}{2}\right] = \dfrac{1}{100} \times \dfrac{100^{2}}{2} = \dfrac{100}{2} = 50.$
We can also find the mean using the continuous uniform distribution.
A continuous random variable $X$ is said to have a uniform distribution on the interval $[a, b]$ if the probability density function (pdf) of $X$ is:
$f(x;a,b) = \left\{\begin{matrix} \dfrac{1}{b-a}\;; & a \leq x \leq b \\ 0\;;&\text{otherwise} \end{matrix}\right.$
$\implies f(x;0,100) = \left\{\begin{matrix} \dfrac{1}{100-0}\;; & 0 \leq x \leq 100 \\ 0\;;&\text{otherwise} \end{matrix}\right.$
$ \implies f(x;0,100) = \left\{\begin{matrix} \dfrac{1}{100}\;; & 0 \leq x \leq 100 \\ 0\;;&\text{otherwise} \end{matrix}\right.$
$ \implies f(x;0,100) = \left\{\begin{matrix} 0.01\;; & 0 \leq x \leq 100 \\ 0\;;&\text{otherwise} \end{matrix}\right.$
For continuous uniform distribution, the mean or expectation $ \mu _{X} = E(X) = \dfrac{a + b}{2} = \dfrac{0+100}{2} = \dfrac{100}{2} = 50. $
So, the correct answer is $(D).$
References: