Logiscool Interview Question

basic c questions and some algorithm