KPIT Technologies interview question

Writing small C code