String Interview Programming Question In C