Tech Mahindra interview question

Self,Basic questions from programming language