Pregunta de entrevista de Accenture

Write a program for deadlock &how to resolve that