I'm trying to make a function that lets me pass an index and a string and will insert the string at that index in the linkedlist... here is so function i have so far, but am confused on whether or not im headed in the right direction...any help would be great!

Code:typedef struct node { char* value; struct node* next; } LinkedList; void llAddAtIndex(LinkedList** ll, char* value, int index) { LinkedList* newNode =(LinkedList*)malloc(sizeof(LinkedList)); newNode->value = value; LinkedList* prevNode = NULL; LinkedList p; p = ????? for(int i = 0; i < index; i++){ prevNode = p; p = p->next; } if (prevNode) { prevNode->next = newNode; newNode->next = p; } else { head = newNode; newNode->next = p; } }