I cannot figure out for this function for the life of me, can anyone help, please?

my struct

Code:typedef struct items item_t; struct items { char name[32]; float cost, weight; int dam; item_t *next; };

There's a helper file to this but, pos is a number read in from the keyboard.Code:/* * This function deletes the item at position pos from queue. pos must be * between 0 and 1 less than the number of items in the list. * RETURNS: possibly new base ptr for list */ item_t *DelItemAtPos(item_t *itb, int pos) { item_t *temp, *prev; prev = itb; temp = itb; int N; if( pos == 1 ) { itb = itb->next; return(itb); } for( N=0; N < pos-1; N++) { prev = prev->next; } prev = prev->next->next; return(itb); }