The following program demonstrates the use of pthread_create to spawn a thread and pthread_join to join with the thread once it terminates and retrieve its return value. The thread itself simply computes the length of the input string.
To run program, simply enter:
./simple_thread
Additional files: