c. thread 1 will find that the value of the semaphore is 0
When thread 0 holds the lock, it has called sem_wait() which decrements the semaphore value by 1. This means that the semaphore value is now 0. If thread 1 tries to enter the critical section by calling sem_wait(), it will find that the semaphore value is 0, meaning that the resource is currently being used by another thread (i.e., thread 0) and thread 1 must wait until thread 0 releases the lock by calling sem_post() which increments the semaphore value. So, thread 1 will put itself to sleep and relinquish the processor.
A semaphore is a synchronization object that controls access to a common resource by multiple processes in a parallel programming environment. Semaphores can be implemented using a counter, which is initialized to a non-negative value. When a process wants to access the resource, it decrements the counter (sem_wait()), if the counter is zero, the process is blocked until another process increments the counter. When a process is done with the resource, it increments the counter (sem_post()). The counter value tells the state of the semaphore, if the value is 0 means the resource is being used, a positive value means the resource is available and negative value means there are more threads waiting for the resource.