1)In the main,declare a pthread_t type variable.
2)Create a thread using pthread_create.
prototype:pthread_create(pthread_t*,attributes,void*(function pointer),void*(argument to be passed)); //attributes=0:::if not used
3)Make a function of return type void *;
4)This function would be called as soon as the thread is created.
5)Use pthread_exit() at the end of this function.
6)In the main function use pthread_join,so that the main program waits till the exit value is not captured from pthread_exit();