Tech Mahindra interview question

General questions about the basic concept