Soliton Technologies interview question

Desing Round , Only c allowed