UST interview question

Simple c program and how we can compute it in more efficient way