Given below are two statements: one is labelled as Assertion (A) and the other is labelled as Reason (R).
Assertion (A): Deadlocks occur in a multi programming environment when each thread in a set is waiting for an event that can be caused only by another thread in the same set.
Reason (R): A thread must always request a resource before using it and release it after using it. If requested resources are not available, the thread enters a waiting state until the resources become free.
In the light of the above statements, choose the most appropriate answer from the options given below: