Pregunta de entrevista de Tech Mahindra

Write program for singleton pattern and explain?