Pergunta de entrevista da empresa Tech Mahindra

Write program for singleton pattern and explain?