Softex interview question

Given situations