The sum of all the even digits in the numbers $1$ to $100$ is required and both inclusive. Observe that $100$ only two null even digits which doesn't add any significant value. So we remove them from our addition list. We make a list with the following numbers:-
$01, 02, 03, ..., 10, 11, ..., 98, 99$
There are $2\cdot 100 = 200$ in our list considering all, and each digit appears $\frac{200}{10} = 20$ times.[By H&T] or, [Formula]
Thus, each even digit appears $20$ times, and the sum of all the even digits is $0 \cdot 20 + 2\cdot 20 + 4\cdot 20 + 6\cdot 20 + 8\cdot 20 = (0 + 2 + 4 + 6 + 8)\cdot 20 = 400$, and the correct answer is $20\cdot 20 = 400$
$ THANK YOU$