1 2 3 4 5 6 7
#include <stdio.h> #include <pthread.h> #define NTHREADS 4 #define NUM_ELEMS 12 #define ELEMS_PER_THREAD (NUM_ELEMS/NTHREADS)