char * newString(int size) { char * string; string = (char *) malloc(size + 1); memset(string, 0, size + 1); if (!NULL) { insertLL(strings, string, sizeLL(strings) + 1); } showLL(strings); return string; }
int main (int argc, char *argv){ int values[] = {1,2,3,4,5,6,7,8,9,10}; lnode *head = (lnode *) malloc(sizeof(lnode)); makeLL(&head,values); printLL(&head); insertLL(&head,23,4); printf("after inserting \n"); printLL(&head); deleteLL(&head,4); printf("after deleting \n"); printLL(&head); return 0; }