Step 1:

Let $X$ be the random variable denoting the marks scored by a student in a school with 800 students.

$P(X < 40)=0.1$

$P(X > 90)=0.1$

$\therefore P(40 < X < 90)=1-0.2=0.8$

Step 2:

The number of students who scored between 40 and 90=$800\times 0.8$

$\Rightarrow 640$