Tech Mahindra Interview Question

Write a program in C.