How to solve assignment : 9 in c programming

i need solution of this assignment so please give me solution of this question ?
thank you