Question 11 What will be the possible outputs for the following program before the lines a, b and c? Format your answer this way: Line a: " Outputis) here Line b: " Outputis) here Line c I Outputis)...


Question 11<br>What will be the possible outputs for the following program before the lines a, b and c? Format your answer this way:<br>Line a:<br>
using namespace std; mutex ml; mutex m2; void funcA() { for (int i = 0; i < 3;="" i++)="" cout="" «="" i;="" void="" funcb()="" {="" uni="" que_lockamutex="" 1(m1);="" for="" (int="" i="6;" i="">< 9;="" i++){="" if="" (i="=" 8)="" return;="" cout=""><« i;="" void="" funcc)="" {="" m2.="" lock();="" for="" (int="" i="3;i">< 6;="" i++)="" cout=""><« i;="" int="" main="" )="" {="" thread="" thi(funca);="" thread="" th2(funca);="" th1.join();="" th2.join();="" a="" thread="" th3(funcb);="" thread="" th4(funcb);="" th3.="" join();="" th4.join();="" b="" thread="" th5(funcc);="" thread="" th6(funcc);="" th5.="" join();="" th6.join();="" c="" return="" 0;="" "/="">
Extracted text: Question 11 What will be the possible outputs for the following program before the lines a, b and c? Format your answer this way: Line a: " Outputis) here Line b: " Outputis) here Line c I Outputis) here #include using namespace std; mutex ml; mutex m2; void funcA() { for (int i = 0; i < 3;="" i++)="" cout="" «="" i;="" void="" funcb()="" {="" uni="" que_lockamutex="" 1(m1);="" for="" (int="" i="6;" i="">< 9;="" i++){="" if="" (i="=" 8)="" return;="" cout=""><« i;="" void="" funcc)="" {="" m2.="" lock();="" for="" (int="" i="3;i">< 6;="" i++)="" cout=""><« i;="" int="" main="" )="" {="" thread="" thi(funca);="" thread="" th2(funca);="" th1.join();="" th2.join();="" a="" thread="" th3(funcb);="" thread="" th4(funcb);="" th3.="" join();="" th4.join();="" b="" thread="" th5(funcc);="" thread="" th6(funcc);="" th5.="" join();="" th6.join();="" c="" return="">

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here