What do you want to save?
Add Code snippet
New code examples
-
C 2021-09-26 00:40:02
how to pass an array to a thread in c?
void* my_Func(void *received_arr_Val){ int single_val = (int *)received_arr_Val; printf("Value: %d\n", single_val); //Now use single_val as you wish } //In main: int values[n]; pthread_create(&thread, NULL, my_Func, values[i]); ... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5