Hexaware Technologies interview question

Asked to write programs in technical rounds