Question: Suppose we have the following thread to return long value to the parent thread void * return _ long _ thread ( void * arg

Suppose we have the following thread to return long value to the parent thread
void *return_long_thread(void *arg){
long n1=0;
static long n2=0;
long *p1=(long )malloc(sizeof(long));
if (p1== NULL) exit();
/ some work is done and the same value is saved into n1, n2, and *p1*/
return(______);
}
which of the following should be used as return statement to be safe in any circumstances?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!