InfoBeans interview question

It was Online coding mcq test.