#include #include #include void *thread_func( void *vptr_args ); int i, j = 0; int main( void ){ char* answer[6] = {"To", "get", "to", "the", "other", "side"}; pthread_t threads[6]; for(j=0;j<6;) { pthread_create( &threads[j], NULL, &thread_func, (void *) answer[j]); } for(i=0;i<6;i++) { pthread_join( threads[i], NULL ); } exit( EXIT_SUCCESS ); } void *thread_func( void *vptr_args ){ fprintf( stderr,(char*) vptr_args ); fprintf( stderr, " "); j++; pthread_exit( NULL ); }