PLz expalin the output of the following program :-
#include<stdio.h> #include<pthread.h> void *thread(void *); int main() { pthread_t t1,t2; char msg1[]="HELLO1"; char msg2[]="HELLO2"; printf("Before create1 \n"); pthread_create(&t1,NULL,thread,(void *)msg1); printf("after create1\n"); printf("before create2\n"); pthread_create(&t2,NULL,thread,(void *)msg2); printf("After create2\n"); printf("Before join1\n"); pthread_join(t1,NULL); printf("After join1\n"); printf("Before join2\n"); pthread_join(t2,NULL); printf("After join2\n"); return 0; } void *thread(void *message) { char *msg; msg=(char *) message; printf("%s\n",msg); return NULL; } -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.