ESI Group interview question

Programs in c to write