Write a program to implement deadlock avoidance algorithm i.e. banker's algorithm using C++.

Program Code :






Output: