how to pass an array value to a pthread in c April 13, 2023 by wordlinkanswers Home - Q & A - how to pass an array value to a pthread in c how to pass an array value to a pthread in c Comment 3 void* my_Func(void *received_arr_Val){</p> <p> int single_val = (int *)received_arr_Val;<br /> printf(“Value: %d\n”, single_val);<br /> //Now use single_val as you wish<br /> }<br /> //In main:<br /> int values[n];<br /> pthread_create(&thread, NULL, my_Func, values[i]);<br /> //i is the index number of the array value you want to send<br /> //n is the total number of indexes you want (array size)</p> <p>//WorldLinkAnswers profile: https://www.codegrepper.com/app/profile.php?id=9192 Popularity 6/10 Helpfulness 10/10 Language c Source: WorldLinkAnswers Tags: c Share Link to this answer Share Contributed on Mar 02 2020 Phoenix 0 Answers Avg Quality 2/10 wordlinkanswers