Answer
a) $4^{10}$
b) $5^{10}$
Work Step by Step
a) When the student has to attempt every question he has 4 choices for each question which are independent of each other . So total ways becomes 4$\times$4.... (10 times) = $4^{10}$.
b) When the student can skip a question he has 5(4 + not attempting) choices for each question which are independent of each other . So total ways becomes 5$\times$5.... (10 times) = $5^{10}$.