Quiz on Condition Variables
It's quiz time! Answer the following questions to test your knowledge and understanding of the condition variables.
We'll cover the following...
We'll cover the following...
Technical Quiz
1.
What would be printed as a result of running following code:
void *child(void *arg) {
printf("3");
done = 1;
return NULL;
}
int main(int argc, char *argv[]) {
pthread_t p;
printf("1");
Pthread_create(&p, NULL, child, NULL);
while (done == 0);
printf("2");
return 0;
}
A.
123
B.
132
C.
312
D.
321
1 / 5