✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
Î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;}