Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
300 B
1
Indexable
Never
#include<stdio.h> 
#include<stdlib.h> 
#include<pthread.h>
void*mythread(void*vargp)
{
sleep(1);
printf("welcome to PThreads Library\n"); 
return NULL;
}
int main()
{
pthread_tid; 
printf("before thread\n");
pthread_create(&tid,NULL,mythread,NULL); 
pthread_join(tid,NULL);
exit(0);
}