logo

Crowdly

Browser

Add to Chrome

În exemplul de cod de mai jos, care mesaj se va afișa primul? void *threadFn(v...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

În exemplul de cod de mai jos, care mesaj se va afișa primul?

void *threadFn(void *unused)

{

printf("Secondary thread\n");

return NULL;

}

int main()

{

pthread_t tid = -1;

  if(pthread_create(&tid, NULL, threadFn, NULL) != 0){

perror("Error creating thread");

return 1;

}

pthread_join(tid, NULL);

printf("Main thread\n");

return 0;

}
0%
0%
More questions like this

Want instant access to all verified answers on moodle.cs.utcluj.ro?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome