Pregunta de entrevista de Wipro

Pattern design question and about pointers