Untitled

Anonymous
plain_text
12/03/2021 1:09 PM
304 B
20
Indexable
    t=(pthread_t *)malloc(ch * sizeof(pthread_t ));
    for(i=0;i<ch;i++)
    {
        pthread_create(&t[i],NULL,print,NULL); //Default Attributes
    }
    for(i=0;i<ch;i++)
    {
        pthread_join(t[i],NULL);
    }
Editor is loading...