TheBihH, he said he wants an array of pointers, not an array of ThreadControlBlock's.
If you want an array of pointers, and the size is known at compile time (e.g. not dependent on data obtained by running the program) then do everything in your code except the malloc() call. This gives you an array of MAX_NUM_OF_THREADS pointers. Note that those pointers (the elements of the array) still need to be initialised.
If the size is not known at compile time, then ue_table needs to be a pointer to pointer
Code:
ThreadControlBlock **ue_table;
and allocate memory for it like this
Code:
ue_table = malloc(MAX_NUM_OF_THREADS*sizeof(ThreadControlBlock *));
Again, this leaves the elements of the array uninitialised.
Either way, to initialise the elements of ue_table, the approach might be (if you want to set them all to NULL pointers)
Code:
for (i = 0; i < MAX_ NUM_OF_THREADS; ++i)
ue_table[i] = NULL;