Question: Consider the following code snippet: static int tot _ balance = 4 0 0 ; void * deposit _ cash ( void * args )
Consider the following code snippet:
static int totbalance ; void depositcashvoid args int balance totbalance; int money int args; printfThread load: d deposit: d
balance, money; sleep; balance money; totbalance balance; printfThread final: d
totbalance; int main int i; int cash; pthreadt tid; for i ; i ; i pthreadcreate&tidi NULL, depositcash, void &cashi; for i ; i ; i pthreadjointidi NULL; printfMain total: d
totbalance; return ;
What are the possible balance values of this account in the end choose all that apply
Group of answer choices
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
