/* Written By: Prawar Poudel 13 Feb 2018 This is written to demonstrate simple creation and waiting for pthread to terminate */ #include #include #include #define NUM_THREADS 5 //the argument that will be sent will be the (int) id void *simpleThreadFunc(void* argument) { int myId = (int)argument; printf("My Id is %d\n",myId); int a = 0; } int main() { //you can create these dynamically also pthread_t myThreads[NUM_THREADS]; int status = 0; int i; for(i=0;i