Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

A project for inside clients is called an q , project.

Answered: 1 week ago