subject

The program shown below uses the Pthreads API. What is the output from the program at LINE C and LINE P? Why? #include #include int value = 0; void *runner(void *param); /* the thread* int main int arge, char *argv) pid t pid; pthread t tid; pthread_attr_t attr pid fork0: if (pid 0) { /* child process */ pthread_attr_init &attr); pthread create(&tid, &attr, runner, NULL); pthread_join(tid, NULL printf("CHILD: value-%d", value); /* LINE C */ else if (pid>0)parent process*/ wait(NULL) printf("PARENT: value-%d", value); /* LINE P */ void runner(void *param) value 27 pthread_exit(O)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
Dave has to create animations for a game. which tool can dave use?
Answers: 3
question
Computers and Technology, 22.06.2019 13:00
Write a program which asks you to enter a name in the form of first middle initial last. so you might enter for example samuel p. clemens. use getline to read in the string because it contains spaces. also, apparently the shift key on your keyboard doesn’t work, because you enter it all lower case. pass the string to a function which uses .find to locate the letters which need to be upper case and use toupper to convert those characters to uppercase. the revised string should then be returned to main in the form last, first mi where it will be displayed.
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
Which of the following is not a symptom of chronic fatigue syndrome
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
Light travels at a speed of 186,000 miles a second. the distance light travels in a year is 5,865,690,000,000 miles/year 5,865,695,000,000 miles/year 58,656,950,000,000 miles/year 6,789,000,0000 miles/year
Answers: 1
You know the right answer?
The program shown below uses the Pthreads API. What is the output from the program at LINE C and LIN...
Questions
question
Mathematics, 15.04.2020 17:27