Logiscool interview question

basic c questions and some algorithm