Question 2
(5 points) (a) Which function takes a thread handle as a parameter, and waits for that thread to terminate?
(5 points) (b) Use the variable sum in correct form, to fill in spaces marked [1] and [2]so that the two print statements show the same value. As your answer write down in what form sum variable should look like in [1] and in [2].
void test (int x, int y, int __[1]__) {
__[1]__ = x + y;
printf("sum in test = %d\n", __[1]__);
}
int main(void) {
int x = 12, y = 3, sum = 0;
test(x, y, __[2]__);
printf("sum in main = %d\n", sum);
return 0;
}