Wipro Interview Question

Question based on the oops followed a coding question.