



At Last, we pass the integer parameter that was provided on the command line, argv. To passing the thread identifier and the attributes for the thread, we also pass the runner() function, where the new thread will begin execution. With the pthread create() function call, separate thread is created.
When it calls the function pthread exit(), when the summation thread will terminate. This program follows the fork-join strategy: after creating the summation thread, the parent thread will wait for it to terminate by calling the pthread join() function.
